web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

I have the same question (0)
  • MohammedRasheed Profile Picture
    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
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
KP-31070522-0 Profile Picture

KP-31070522-0 3

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans