How to assign new No Series

teckpohteckpoh Member Posts: 271
Dear All,

I create a series no. called 'cashsales' at 'finance mgmnt'->setup folder there.
And i wish to use this 'cashsales' series no. for my customized form.

I created a form and i wan it'll display the next series No each time it's open.
At form-OnInit() trigger, i wrote
salesID := nomgnt.GetNextNo('CASHSALES',TODAY,FALSE);

But everytime i open my form the salesID(the series no) is printed the same(eg: CS0001) although i set it as getNextNo. Other than GetNextNo function what should i code in order to get next series no? or i nid to update it? how? Any idea? 10s in adv......

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    teckpoh wrote:
    Dear All,

    I create a series no. called 'cashsales' at 'finance mgmnt'->setup folder there.
    And i wish to use this 'cashsales' series no. for my customized form.

    I created a form and i wan it'll display the next series No each time it's open.
    At form-OnInit() trigger, i wrote
    salesID := nomgnt.GetNextNo('CASHSALES',TODAY,FALSE);

    But everytime i open my form the salesID(the series no) is printed the same(eg: CS0001) although i set it as getNextNo. Other than GetNextNo function what should i code in order to get next series no? or i nid to update it? how? Any idea? 10s in adv......

    check the Sales Order or Purchase Order No series functionality

    purchase header tabel
    On Insert Trigger
    IF "No." = '' THEN BEGIN
    TestNoSeries;
    NoSeriesMgt.InitSeries(GetNoSeriesCode,xRec."No. Series","Posting Date","No.","No. Series");
    END;
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • nisal83nisal83 Member Posts: 1
    write the code like this
    NoText := Noseries.GetNextNo(InvSetup."Transfer Order Nos.",TODAY,TRUE);
    ***Pass the parameter TRUE ******
  • DenSterDenSter Member Posts: 8,305
    You'll find examples of how to do it properly in all master tables (Item, Customer, Vendor, Etc.). You should program that on the table level, NOT on the form.
Sign In or Register to comment.