Impersonation in scoped app - Run as admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2024 05:01 AM
How to do run as admin activity in Flow Designer.
I have a requirement to convert the run as admin script activity of workflow editor to flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2024 11:07 PM - edited 10-06-2024 11:14 PM
I meant you can try below steps,
1. You need to register an 'event' first and create a 'script action' for that (in normal platform not related to Flow or workflow). Events get processed asynchronously and with admin privilege.
2. Then that 'script action' will have all the logic you want to implement in you flow custom 'script' action.
3. Then create a custom 'script' action in your Flow, which will call the 'event' that you created and pass the any values from any flow steps (if you want to) using gs.eventQueue().
You can have a quick look at the community thread to get some idea about event and script action.
You can also take a look nice youtube video from ServiceNow Community channel by Chuck Tomasi that will give you clear understanding of how to call gs.eventqueue() as well.
API adventures by ServiceNow community
If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.
You can mark multiple responses as correct by clicking on Accept as Solution.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das