DDDCustVendGlobal::submitToWorkflow(vendTable);
----------------------------------------------------------------------------
public static void submitToWorkflow(VendTable _vendtable)
{
WorkflowVersionTable workflowVersionTable = Workflow::findWorkflowConfigToActivateForType(workFlowTypeStr(VendTableChangeProposalWorkflow), _vendtable.RecId, _vendtable.TableId);
//If workflow is active then submit the workflow.
if (_vendtable.RecId && workflowVersionTable.RecId)
{
//submitting to workflow
Workflow::activateFromWorkflowType(workFlowTypeStr(VendTableChangeProposalWorkflow), _vendtable.RecId, "AutoSubmitWorkflow", false, curUserid());
//Update the workflow status to Submitted on the table.
vendTable::updateWorkflowState(_vendtable.RecId, VendTableChangeProposalWorkflowState::Submitted);
}
}
No comments:
Post a Comment