Skip to main content

Notifications

Announcements

No record found.

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 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans