Hi,
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, salesParmUpdate.ParmId, salesParmUpdate.Proforma); batchHeader.addRuntimeTask(salesFormLetterEndMultiThread,this.parmCurrentBatch().RecId); } if (batchHeader) { formLetterMultiThread = FormLetterMultiThread::newFormLetter(this); batchHeader.addRuntimeTask(formLetterMultiThread,this.parmCurrentBatch().RecId); batchHeader.addDependency(salesFormLetterEndMultiThread,formLetterMultiThread,BatchDependencyStatus::FinishedOrError); }