Search code examples
netsuitesuitescriptsuitescript2.0suitescript1.0

"nlapiTriggerWorkflow" is not defined - Oracle Netsuite


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?


Solution

  • 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.