Skip to main content



No record found.

Dynamics 365 Community / Forums / Finance forum / Multithreading/SalesFo...
Finance forum
Suggested answer

Multithreading/SalesFormLetter in D365

Posted on by 217


I want to know I have found this code snippet in AX2009 for multithreading in batch processing in SalesFormLetter class. Can anyone tell me in which class same functionality is performed in D365 for multithreading. I also found that salesFormLetterEndMultiThread has been depreciated in D365. What is used instead? I also want to know I want to add some custom code to execute in salesformletter in between of a process but in D365 we have only Pre and Post Eventhandlers. And FormLetterservice is responsible for posting journals. What would be my starting point If I want to generate two Invoice journals with respect to lines.  

Urgent help is highly appreciate able. Thanks in advance.

if (this.canMultiThread())
    batchHeader = BatchHeader::construct(this.parmCurrentBatch().BatchJobId);
    salesFormLetterEndMultiThread = SalesFormLetterEndMultiThread::newFormLetter(this,

if (batchHeader)
    formLetterMultiThread = FormLetterMultiThread::newFormLetter(this);
  • Blue Wang Profile Picture
    Blue Wang on at
    RE: Multithreading/SalesFormLetter in D365

    Hi @NoMe,

    SalesDormLetterEndMultiThread has depreciated in D365.

    You can learn about these two classes.

    PurchFormLetterEndMultiThread Class :

    FormletterServiceMultithread Class :

    I hope it will help you.

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,643 Moderator on at
    RE: Multithreading/SalesFormLetter in D365

    You can use Chain Of Commands feature for your customizations.  Also note you can not add code in between , in short you can not avoid execution of standard code . If your method  has some parameters which you can manipulate , there is possibility to avoid some code based on how they are used.  FormLetterframework is responsible for lot of posting related to SO , PO etc.. If you are talking about journal posting You should look at classe JournalCheckPost .

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Multithreading/SalesFormLetter in D365

    try SysOperationFramework

    great source here

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,835 Super User

Martin Dráb Profile Picture

Martin Dráb 225,526 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans