Pages

Sunday 8 February 2015

Setup No. Series in Navision 2013 or 2015

Setup No. Series in Nav 2013 or 2015
Number series is a great feature in Navision that allows automatically insert a number when new record is inserted into the table.
Step by step explain, how to setup a new No. Series on table and use on Page in Navision 2013 or 2015.

Step 1 – Create a number series in table No. Series (308).


















Step 2: Create line in table No. Series Line (309)










Step 3: Create a field “Test Nos.” in Inventory Setup (313) table as field 50001.












Step 4: Add field on Inventory Setup page (461) as shown in the below image or enter the name of No. Series (TEST-01).














Page: Inventory Setup













Step 5: Create the table which must have 2 fields, “No.” and “No. Series



Create two variable and one function AssistEdit as shown in below images.

















Step 6: Write the following code in table Demo No. Series.

IF "No." = '' THEN BEGIN
  InvtSetup.GET;
  InvtSetup.TESTFIELD("Test Nos.");
  NoSeriesMgt.InitSeries(InvtSetup."Test Nos.",xRec."No. Series",0D,"No.","No. Series");
END;

IF "No." <> xRec."No." THEN BEGIN
  InvtSetup.GET;
  NoSeriesMgt.TestManual(InvtSetup."Test Nos.");
  "No. Series" := '';
END;

InvtSetup.GET;
InvtSetup.TESTFIELD("Test Nos.");
IF NoSeriesMgt.SelectSeries(InvtSetup."Test Nos.",xRec."No. Series","No. Series") THEN BEGIN
  NoSeriesMgt.SetSeries("No.");
  EXIT(TRUE);
END;
















Create a New page, where you want to setup No, Series.






Page: Write the code on No. - OnAssistEdit()

IF AssistEdit THEN
  CurrPage.UPDATE;


















This is how you setup No series in Navision 2013 or 2015. Your final Page look like below image.









No comments:

Post a Comment