Batch Jobs in D365FO
Batch Jobs in D365FO
MS D365 FO
What is Batch Job?
while select forupdate * from purchReqTable purchLine.createLine(false, true, true, true, true, true);
where purchReqTable.RequisitionStatus ==
PurchReqRequisitionStatus::Approved ttsCommit;
{
}
_recID = purchReqTable.RecId;
ttsbegin;
ttsbegin;
numberSeq = purchReqTable.RequisitionStatus =
NumberSeq::newGetNum(PurchParameters::numRefPurchId( PurchReqRequisitionStatus::Closed;
)); purchReqTable.update();
numberSeq.used();
purchTable.PurchId = numberSeq.num(); ttscommit;
}
purchTable.initValue(); }
purchTable.initFromVendTable(VendTable::find(_AccountNum)
); }
Service Class
With the addition of the Service class, the batch job becomes more
modular and maintainable.
Since PO created against some vendor Account so we need to create
contract class to pass the parameters
Contract Class
This class defines the data contract for the batch job. It contains methods to get and
set the values of the parameters that are entered in the dialog box.
To execute a batch job using an Action menu item, you can create the
item and assign your Controller class to it. When running the code,
you have the option to schedule the job by clicking on ‘Recurrence’.