- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:29 AM
Hi Everyone,
We have a workflow in Requested Item that starts with a run script to query for servers. Workflow is running as expected when opening as admin but when end-users, it is not executing. How to run the workflow as admin?
Thanks,
Diane
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:48 AM
Hi there,
Do you mean, that when an end-user enters a catalog item, that the workflow is performed under that end-user?
As workaround, you could add a 1 second timer. After that timer, the workflow will continue to run under system instead of the user that entered the catalog item.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:41 AM
Can you share the script, which you are running inside the workflow?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:48 AM
Hi there,
Do you mean, that when an end-user enters a catalog item, that the workflow is performed under that end-user?
As workaround, you could add a 1 second timer. After that timer, the workflow will continue to run under system instead of the user that entered the catalog item.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 10:30 AM
Great tip Mark. I needed to this as well, however, what I noticed was that you need to put the timer immediately before the run script activity, otherwise, if you do it at the beginning of the workflow then if an approval request comes along, that will change the executing mode back to whoever that approver was and the activities will run with the approver's privileges (or lack thereof).
In my case, the Run Script activity came after the approval request, so I moved the timer after the approval and before the Run Script and it worked.
In my case, my Run Script was trying to apply templates to records that the run script was attempting to create and without that timer the subsequent Run Script would execute with the permissions / privileges of the approver, and since this one approver did NOT have access to sys_templates, it was failing.
Now it is working.
Hope this clarification helps!
Ty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:49 AM
If you add a timer of 1 sec to your worklfow, then all actions post that timer will be executed as admin.
Mark the comment as a correct answer and helpful if it helps.
