Hi All,
I have created a dialog and added one parameter " Auto submit workflow". if Auto submit workflow is enabled yes and run the dialog then it will check each PO , which having staus = open order, approval status = Draft and PO lines, unit price should not be 0.
If the above condition is matched then the respective PO should be auto submit.
I wrote the below code for testing purpose
static void AutoSubmitWorkFlow(Args _args)
{
RecId recId;
recId = PurchTable::find("PO-0007929").RecId;
Workflow::activateFromWorkflowType(workFlowTypeStr(PurchTableTemplate), recId,"auto submit to workflow", false, curUserid());
info("done");
}
It successfully executed but not submitted the PO = PO-0007929

Kindly let me know, if i missed any thing?
Please give me more shed on this.
thanks!