Procedure to create custom No. Series in Dynamics NAV - CloudFronts

Procedure to create custom No. Series in Dynamics NAV

One of the main reasons for the popularity of microsoft dynamics nav upgrade is its simple to learn interface and its adaptability. Microsoft Dynamics NAV is a famous ERP framework among fair size associations. It’s known for being anything but difficult to introduce and get familiar with its interface. It’s a crucial framework for most retailers as it controls your financials, flexible chain, deals, business insight and that’s only the tip of the iceberg. 

As retailers develop however. the requirement for incorporating their NAV ERP gets apparent. Your ERP isn’t the main framework expected to run your activities. Retailers must have similar information between their POS, eCommerce, commercial center, 3PLs, and other significant frameworks. Coordinating Microsoft NAV with other retail frameworks is very difficult.

Introduction:

No. Series is used to create records in Dynamics NAV with unique numbers. Unique numbers are assigned to data records automatically using No. Series. The format to be used for the No. Series should be set up initially once which consists of a combination of numbers and alphabets.

Pre-Requisite:

Microsoft Dynamics NAV

Purpose:

In this article, I will be demonstrating the procedure to create a custom No. Series in a custom table.

Procedure:

  1. Create a new field in Table 311 – Sales & Receivables Setup which will save the No. Series selected.

    Navigate to the properties of this field and in TableRelation property select Table 308 which is ‘No. Series’.

    Add the newly created field ‘CF_CreditNoteEntity’ to the Page 459 – Sales & Receivables Setup so that it is accessible to the user from the NAV windows or web client.

  2. Now create a new field ‘No. Series’ in a custom table with Data Type ‘Code’.

    Navigate to the properties of the No. Series field and in TableRelation property select Table 308 which is ‘No. Series’.

    Note: ‘No.’ field is the primary key of the custom table which will save the unique No. Series.

  3. Create two new variables in C/AL globals in the custom table.
    a. SalesSetup of DataType ‘Record’ and Subtype ‘Sales & Receivables Setup’ which is Table 311.
    b. NoSeriesMgt of DataType ‘Codeunit’ and Subtype ‘NoSeriesManagement’ which is Codeunit 396.
  4. In OnInsert() trigger of the table add the following code:
  5. In OnValidate() trigger of the primary key field which will save the unique No. Series add the following code. In this scenario, I have added it to the OnValidate() trigger of ‘No.’
  6. Go to ‘No. Series’ which is Table 308 and create a new entry for the No. Series to be used.

    To generate ‘No. Series’ automatically you need to select ‘Default Nos.’ checkbox. If you also want the field to support manual nos. then you should select the checkbox ‘Manual Nos’.

    The ‘Last No. Used’ field gets updated automatically when a record is created and the unique No. Series is inserted in the table.

  7. Navigate to Sales & Receivables Setup which is Page 459 and select the No. Series for the newly created field in step 1 from the drop down list.                                                                                                                  
  8. Hence, automatically when you create a new record, the No. Series will get inserted and a unique record will be created.

Conclusion:

Thus following this procedure, a custom ‘No. Series’ can be created for a custom table with any combination of alphabets and numbers which will create unique records.


Share Story :

Secured By miniOrange