Number series codeunit TryGetNextno from XMLport error.

kenjeskenjes Member Posts: 76
Hi

I use this code in a XMLPORT :
CLEAR(NoSeriesMgt);
DocNo := NoSeriesMgt.TryGetNextNo(GenJournalBatch."No. Series", WORKDATE);

I'm getting attached error.

Why

Thanks.
<img src="https://us.v-cdn.net/5022383/uploads/FileUpload/9c/e372039ca45b85aaf79a3d40166743.jpg&quot; />

Best Answer

Answers

  • Rishi1109Rishi1109 Member Posts: 43
    Where have you written the code in XMLPort i mean in which trigger ?
    Thanks and Regards
    Rishi
  • kenjeskenjes Member Posts: 76
    I have the code in "Integer - Import::OnAfterInitRecord()"
  • Rishi1109Rishi1109 Member Posts: 43
    Try after moving your code to OnAfterImport or OnAfterAssignVariable
    Thanks and Regards
    Rishi
  • kenjeskenjes Member Posts: 76
    I moved my code to : OnPreXMLport - now it works
    Thanks - Duikmeester
Sign In or Register to comment.