- 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
07-05-2024 02:29 AM
This script where can i write, should i use in UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 07:20 AM
thanks a lot ...that worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 07:44 AM
Prashant,
Glad to see that you are using the Community to learn more.
The Customer Experience team is striving to ensure that customer queries posted from the HI Service Portal are answered in timely and accurate fashion.
If you feel your question has been resolved, please mark the appropriate reply in the thread as being the Correct Answer.
This enables other customers to learn from your thread.
Thank you in advance.
Regards,
Teena Singh
Customer Experience: UX Strategy and Customer Insights
teena.singh@servicenow.com
ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2018 06:28 AM
hi everyone
I am getting the same message in a different context.
I have made a new workflow on the sn_customservice_case tabel. There is only one condition - the account is someone. I was "in the Customer service scope" when i made the workflow.
to be able to se it, I have made an UI action "Show workflow" to this table too. (it was not there OOB)
The workflow starts and works ok, the UI action works ok - but when the record is saved it shows this Error Message "Workflow undefined, maybe missing global qualifier"
it has nothing to do with the UI action, since the workflow is made when the Case record is saved, The error also shows each time the record loads.
I guess a "Global" is missing somewhere. Is it a Business Rule or Script Include which is starting the workflow?
any ideas?
br Erik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2018 06:42 AM