Dynamics Ax RunBaseBatch multithreading

Hi, Next post will be a little tutorial on how the RunBaseBatch framework can work multithreaded. For example in the SalesFormLetter class on the method run, the following code will be found before the query iteration: if (this.canMultiThread()) { batchHeader = BatchHeader::construct(this.parmCurrentBatch().BatchJobId); salesFormLetterEndMultiThread = SalesFormLetterEndMultiThread::newFormLetter(this, salesParmUpdate.ParmId, salesParmUpdate.Proforma); batchHeader.addRuntimeTask(salesFormLetterEndMultiThread,this.parmCurrentBatch().RecId); } The SalesFormLetterEndMultiThread that is being created… Continue reading Dynamics Ax RunBaseBatch multithreading

Dynamics Ax creating a batch job from code

Hi, Here is a simple code snippet to create Batch jobs from code. This convenient when starting a heavy load job from a user interface and still keep the client responsive. TSTSalesOrderUpdate tSTSalesOrderUpdate;   BatchInfo batchInfo; BatchHeader batchHeader; ;   tSTSalesOrderUpdate = TSTSalesOrderUpdate::construct();   batchInfo = tSTSalesOrderUpdate.batchInfo(); batchInfo.parmCaption("Test from code"); batchInfo.parmGroupId("");   batchHeader = BatchHeader::construct();… Continue reading Dynamics Ax creating a batch job from code