Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

'Invoice Register' via alternative form - Voucher number allocation

(0) ShareShare
ReportReport
Posted on by 55

Hi,

 I am attempting to create journal vouchers for the 'Invoice  Register' via a newly written form, but I am getting problems with correctly allocating the voucher numbers from the number sequence.  

When I can get them allocated, once the new form exits, they are not retained, but are released back into the number sequence list for re-use. 

I am calling the same classes as the standard form ( LedgerJournalTransInvoiceRegister) in equivalent places, but they are not having the required effect

*This post is locked for comments

  • MohammedRasheed Profile Picture
    MohammedRasheed 1,405 on at
    Re: 'Invoice Register' via alternative form - Voucher number allocation

    Hi David,


    Just to expand on dicks answer.

    In Dynamics AX, if you use a continuous number sequence (which most voucher sequences are), then ax holds the sequence and transaction in a table called NumberSequenceList (check this table out, it would hold the vouchers you used so far) and when the numberSequence is marked as use, ax deletes the record from this table.

    if i remember correctly invoiceJournals use the class InvoiceJournalEngine .. which in turn uses the NumberSeqFormhandler to assign and mark number sequences... try searching (find) for used or abort on the class.

    coming back to your question.. i dont know how designed the form, but if you are assigning the numbersequence in your code (and not using the formhandler) then please make sure that you call NumberSeq.used() in the end.

    hope this helps.

    let us know if you have any more questions.

    regards,

    Mohammed Rasheed
    www.dynamic-ax.co.uk

  • Dick Wenning Profile Picture
    Dick Wenning 8,705 Moderator on at
    Re: 'Invoice Register' via alternative form - Voucher number allocation

    when you use Nubersequences you have to add the used method

     

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.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans