- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 06:44 AM
Hello All, I have a workflow called "Sample Workflow" in one custom scoped app. I am trying to start it in a UI action from another custom scoped app.
var wf = new Workflow();
var wfId = wf.getWorkflowFromName("Sample Workflow");
var vars = {};
vars.u_var1 = var1_value;
wf.startFlow(wfId, null, "Sample Workflow", vars);
When I click on the UI action, I am getting an error which says "Workflow undefined, maybe missing global qualifier"
Does anyone have any pointers on what is missing? how do I declare global qualifier?
Thanks in Advance
Prashant
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 06:46 AM
Hi Prashant,
Easy fix. Add global. in front of your Workflow instantiation.
var wf = new global.Workflow();
var wfId = wf.getWorkflowFromName("Sample Workflow");
var vars = {};
vars.u_var1 = var1_value;
wf.startFlow(wfId, null, "Sample Workflow", vars);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 06:46 AM
Hi Prashant,
Easy fix. Add global. in front of your Workflow instantiation.
var wf = new global.Workflow();
var wfId = wf.getWorkflowFromName("Sample Workflow");
var vars = {};
vars.u_var1 = var1_value;
wf.startFlow(wfId, null, "Sample Workflow", vars);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2018 01:41 PM
Hello Chuck,
Is there some documentation on "global" object? Iwould like to read more, but cannot find anything.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2018 04:50 AM
Can you provide some details of what you are looking for or where you have seen this used? Normally, you specify "global." in front of something if you are using it from a scoped app. It's not so much an object as explicitly specifying items from another scope. Much like sn_ws.RESTMessageV2().
If I'm not getting the right point, please let now with examples and details. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 06:29 AM
Hi Chuck--know the cause of this when it's a workflow tied to a table/condition and not one called from a WF? I have a record producer creating the record (scoped app) from the service portal. When I run a test and navigate to the newly generated record, I get the error.