Wrong generating of Document No. in General Journal Line

RainerRainer Member Posts: 103
edited 2015-04-17 in NAV Three Tier
I import data to a Temp Table from where I transfer Journal Lines to the standard General Journal Line Table.

When generate the next "Document No." I write this code and the NumberSerie Lines update "Last Used No." with the last number used from the current Journal.

NextDocNo := NoSeriesMgt.GetNextNo(GenJnlBatch."No. Series","Posting Date",TRUE)
GenJournalLine."Document No." := NextDocNo;

(TRUE will modify the NumberSerie Line "Last No.")

If I use FALSE the system takes NextDocNo from a total different NumberSerie, why? I find GenJnlBatch."No. Series" so I know I have the correct No. Serie Code.

Can anybody give me a line which is working?

Cheers
Kind Regards

E-mail: info@rainerbay.dk
Skype: rainerbaydk

Comments

  • RainerRainer Member Posts: 103
    Actually solved now and a little strange after my opinion.

    NoSeriesMgt.GetNextNo(GenJnlBatch."No. Series","Posting Date",TRUE)

    if I make it with TODAY and not the actual posting date, then it wil Work.
    Kind Regards

    E-mail: info@rainerbay.dk
    Skype: rainerbaydk
Sign In or Register to comment.