I have tried different methods for this case. I could change the lookup using an attribute, but for manual entry and for the Prev/Next/Last buttons, it doesn’t work. When I write e.NewValue = null or e.Cancel, or throw some exception in FieldUpdating/FieldVerifying, in some cases it returns an error, but the record still gets displayed. I tried using a Current Document delegate to change and add restrictions and also wrote a restriction attribute, but these options didn’t work either.
Question
How to prevent selecting certain order numbers in Sales Order Entry using customization?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.