Blog

Name is Anant Dubey and the intent to create this blog is to discuss the problems and issues that developer face in the dynamics AX development and to share the new things that come up with the new version of AX.

Monday, May 17, 2021

Update workflow status through code in d365fo

 Purchase Requisition

if(PurchReqWFStatusTransitionHelper::setPurchReqTable2InReview(purchReqTable.RecId))

{
Workflow::activateFromWorkflowType(‘PurchReqReview’,
purchReqTable.RecId,
‘Auto-Submitted into workflow’,
false,
curUserId() );
}

PurchReqWFStatusTransitionHelper::setPurchReqTable2Approved(purchReqTable.RecId,false);

ttsCommit;
info(purchReqTable.PurchReqId);
}

No comments:

Post a Comment