Notifications
Announcements
No record found.
Hello everyone. I have a requirement where in I need to auto generate a number sequence and assign it to Invoice in the LedgerJournalEntity.Which method should I extend in the LedgerJournalEntity? Are there any similar entity that auto generates a number sequence based from a condition? Example if customField == NoYes::Yes then generate a number sequence. Thanks everyone.
Hi xppdev,
You can treat it as virtual field which the value is based on conditions:
docs.microsoft.com/.../data-entity-computed-columns-virtual-fields
and use the x++ code to generate the number sequence:
https://dynvision365.com/2019/10/30/create-number-sequence-in-steps/
regards
Hi,
you can use below code to generate and use number sequence:
NumberSeq numberseq; NumberSequenceTable numberSequenceTable; numberseq = NumberSeq::newGetVoucherFromCode(NumberSequenceTable::find(ledgerJournalName.NumberSequenceTable).NumberSequence); voucherNum = numberseq.voucher(); //Other your code... numberseq.used();
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader