10 Oct’17

Dynamics NAVProcedure to create custom No. Series in Dynamics NAV


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.


Microsoft Dynamics NAV


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


  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.


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.

Written by

Team Member


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more