Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Multiple Sequence Number for Sales Invoice AX 2012

(0) ShareShare
ReportReport
Posted on by 108

Hi,

May I know which class or method should I put my custom code for generating Custom Sales Invoice  Number Sequence?
Our company used two different number sequence for Sales invoice. The  Number Sequence for service and Item is different.

I have read somewhere that the sequence number is generated in CustPostInvoice class and allocateNumAndVoucher method so I tried putting my code there. I used info('show some message') to check if it's really executing the class when posting the invoice but seems that it's not.  

My code is also ready. What I need to know is which class and method does the Sales Invoice generates the Number Sequence.

Thanks.

*This post is locked for comments

  • Anoop Tripathi Profile Picture
    Anoop Tripathi 790 on at
    RE: Multiple Sequence Number for Sales Invoice AX 2012

    Can you share the code you wrote I am also trying to do something similar.

    Thanks 

  • Von Profile Picture
    Von 108 on at
    RE: Multiple Sequence Number for Sales Invoice AX 2012

    No, we cannot use the number sequence group because it has to be set every time you create a new sales order.  Thanks Palle for the idea. Its now picking the correct Sequence number base on the given parameter after I put my code  in \Classes\SalesInvoiceJournalCreateBase\allocateNumAndVoucher.

  • Akhwand Usman Profile Picture
    Akhwand Usman 1,026 on at
    RE: Multiple Sequence Number for Sales Invoice AX 2012

    If you have saprate sales orders from Item and services you can use default functionality.  You need to define number seq for invoice in number sequence group and attached this group on Sales order header--> setup --> posting --> number seq. group.

    Regards,

    Akhwand Usman

  • Suggested answer
    PA-22040759-0 Profile Picture
    PA-22040759-0 6,194 on at
    RE: Multiple Sequence Number for Sales Invoice AX 2012

    I can't see from your question, what kind of sales invoices you are working with, but if I remember correctly CustPostInvoice is for posting free text invoices, not sales order invoices.

    For a sales order invoice I think you need to place your code in \Classes\SalesInvoiceJournalCreateBase\allocateNumAndVoucher.

    Another reason for the code not seeming to be executed, could be that you  are missing a CIL compilation.

    Also, did you look into the standard "Number sequence group" feature on SalesTable? This will actually allow you to use different number sequences based on the group specified in this field.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,329 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans