WorkflowVersionTable workflowVersionTable;
//Check whether we have a Active workflow on the table.
workflowVersionTable = Workflow::findWorkflowConfigToActivateForType(workFlowTypeStr(KMTSalesAgreementLineWFType),
agreementLine.RecId,
agreementLine.TableId);
//If workflow is active then submit the workflow.
if (agreementLine.RecId && workflowVersionTable.RecId)
{
//submitting to workflow
Workflow::activateFromWorkflowType( workFlowTypeStr(KMTSalesAgreementLineWFType),
agreementLine.RecId,
"@KMT_Label:AutoSubmitWorkflow",
false,
curUserid());
//Update the workflow status to Submitted on the table.
salesAgreementHeader::updateWorkflowStatus(agreementLine.RecId,
KMTSalesAgreementWFStatus::Submitted,
NoYes::No);
}
Valuable post useful for everyone.Keep on sharing.
ReplyDeleteMS Dynamics AX Online Training
ReplyDeleteIt is amazing to visit your site. Thanks for sharing this information, this is useful to me...
Microsoft Dynamics AX Training
MS Dynamics AX Training
MS Dynamics Training in Hyderabad
Microsoft Dynamics AX Technical Training
Microsoft Dynamics AX Technical Training in Hyderabad
MS Dynamics Technical Online Training
MS Dynamics AX Technical Training in Hyderabad
MS Dynamics AX Online Training
D365 AX Online Training
d365 ax technical online training
d365 ax technical training