SBX - Search With Button

SBX - Forum Post Title

No. Series Code'' does not exist

Microsoft Dynamics NAV Forum

jsshivalik asked a question on 13 Mar 2018 11:24 AM
My Badges

Question Status

Verified

Hi

In the below code it gives above error

"Journal Template Name":='GENERAL';
"Journal Batch Name":='test';
"Posting No. Series":='JV';
"Line No.":=GetLineNo;

GenJnlLine.RESET;
GenJnlLine.SETRANGE("Journal Template Name",'GENERAL');
GenJnlLine.SETRANGE("Journal Batch Name",'test');
GenJnlLine.SETRANGE("External Document No.", "External Document No.");
IF NOT GenJnlLine.FINDFIRST THEN
"Document No.":= NoSeriesMgt.GetNextNo(GenJnlLine."Posting No. Series", "Posting Date",FALSE)
ELSE
"Document No.":= GenJnlLine."Document No.";

Thanks

Reply
Mohana Yadav responded on 13 Mar 2018 11:27 AM

"Document No.":= NoSeriesMgt.GetNextNo(GenJnlLine."Posting No. Series", "Posting Date",FALSE)

I guess GenJnlLine."Posting No. Series" is blank

Reply
jsshivalik responded on 13 Mar 2018 11:48 AM
My Badges

Hi

 What changes should i do in my code . Secondly How the below line works

"Document No.":= NoSeriesMgt.GetNextNo(GenJnlLine."Posting No. Series", "Posting Date",FALSE)

Thanks

Reply
Mohana Yadav responded on 13 Mar 2018 11:50 AM
Suggested Answer

you need to pass right value in first parameter like from No. series code to use.

please dont expect code changes.. expect only suggestions..

Reply
jsshivalik responded on 13 Mar 2018 11:52 AM
My Badges

Hi

 Can u pls guide how the below line works

NoSeriesMgt.GetNextNo(GenJnlLine."Posting No. Series", "Posting Date",FALSE)

Thanks

Reply
Mohana Yadav responded on 13 Mar 2018 11:56 AM
Verified Answer

1st paramenter is no. series code (using this no. series only next no will be generated)

2nd parameter Posting date, this you have multiple no. series with different start date then this posting date is used to get right no. series by start date.

3rd parameter is update the no. series or not. it should be yes..

Reply
Mohana Yadav responded on 13 Mar 2018 11:56 AM
Verified Answer

1st paramenter is no. series code (using this no. series only next no will be generated)

2nd parameter Posting date, this you have multiple no. series with different start date then this posting date is used to get right no. series by start date.

3rd parameter is update the no. series or not. it should be yes..

Reply
Mohana Yadav responded on 13 Mar 2018 11:50 AM
Suggested Answer

you need to pass right value in first parameter like from No. series code to use.

please dont expect code changes.. expect only suggestions..

Reply

SBX - Two Col Forum

SBX - Migrated JS