Using a number sequence handler
As already discussed in the Creating a new number sequence recipe in Chapter 1, Processing Data, number sequences are widely used throughout the system as part of the standard application. Dynamics AX also provides a special number sequence handler class to be used on forms. It is called NumberSeqFormHandler
and its purpose is to simplify the usage of record numbering on the user interface. Some of the standard Dynamics AX forms, such as Customers or Vendors, already have this feature implemented.
This recipe will show how to use the number sequence handler class. Although in this demonstration we will use an existing form, the same approach should be applied when creating brand new forms.
For demonstration purposes we will use an existing Customer groups form located in Accounts receivable | Setup | Customers and we will change the Customer group field from manual to automatic numbering. We will use the number sequence created earlier in the Creating a new...