I tried to trigger a workflow programatically,
nlapiTriggerWorkflow(recType, recId, workflowId, actionId, stateId)
But I am getting,
"nlapiTriggerWorkflow" is not defined
both in console and in script debugger. Why do I get this error?
The issue is that nlapiTriggerWorkflow
is server side only. If you want to trigger a workflow client side you can add a button to the preceding work flow step (see the docs) and trigger your workflow from that.