web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Event handlers on sales invoice posting in batch mode

(0) ShareShare
ReportReport
Posted on by 2

I need to trigger a custom process to run after the posting of sales invoices in batch.

I have not been able to find a suitable place to put the event handler to trigger this code.

Has anyone used event handlers on sales invoice posting process in batch mode (with multi-threading).

Where is the best place to put the event handler?

*This post is locked for comments

I have the same question (0)
  • nmaenpaa Profile Picture
    101,172 Moderator on at

    Is your question about Dynamics AX (2012) or Dynamics 365 for Finance and Operations?

    Anyway, it should not matter if it's run in batch or not, it runs through the same code. And then you can find out in your event handler if the code is running in batch or not.

    In AX2012 you would call clientKind() method.

    In D365FO you would call hasGUI() method.

  • ciarand Profile Picture
    2 on at

    AX2012 R3.

    I put the event handler on the SalesFormLetter_Invoice.afterOperationBody() this code only runs on client, batch mode does not run this code (verified with trace parser)

    It runs the FormLetterServiceMultithread class but can determine where to put event handler for the batch mode to only trigger for sales invoicing

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 34

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans