No. series problem

vg2809
vg2809 Member Posts: 14
Without the help of this forum, it would have been difficult to solve some of the problems encountered, like , file processing etc.

As an inexperienced person, I find the belowmentioned problem, unsolvable .

While adding records to journal file, I use "NoSeriesMgt(TryGetNextNo(journalBatch."No. Series",TODAY) to get the document no., based on the series and date ( TODAY ). But the no needs to be incremented and I
modify the noseries line with the document no. and date .

If I dont modify, the no is not incremented . If I modify, posting fails with incorrect document no. Can anybody help . Thanks

Comments

  • FPulsfort
    FPulsfort Member Posts: 43
    Have you tried it with

    NoSeriesMgt.GetNextNo(JournalBatch."No. Series", TODAY, TRUE); ?

    The last Parameter says: Modify (Increase) NOS or not.

    Regards,
    Frank
  • vg2809
    vg2809 Member Posts: 14
    I did try separately with TRUE as well as FALSE .
    TRUE increases the no. to next .
    FALSE only gets the same no.
    The problem with TRUE is that since it increases the no. posting fails .
    The problem with FALSE is that the solution works ONLY for one voucher.
    At a time I want to update many vouchers, in which case, since the no.
    is not incremented, all the vouchers have the same no . Posting goes thru
    OK. But the no. cannot be the same .
  • jem
    jem Member Posts: 3
    You can check function SetupNewLine in Table 81.

    take the first document no with NoSeriesMgt.TryGetNextNo and for the others you can just increment the document no.