- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 10:44 AM
Our onboarding workflow creates an SCTASK for Service Desk to update data in AD about a rehire; someone that already has an existing user record in ServiceNow. After the SCTASK is closed, a run script queries the sys_user table and updates the record. I have found that the person from Service Desk who closed the SCTASK becomes the sys_created_by on the activity of the run script. Due to this, I have confirmed that since non-admin do not have permissions to query inactive user records, the run script fails to find the existing inactive sys_user record and therefore fails to update the record.
Is there a way to force the run script to run as system, admin, etc., instead of the user that closed the previous task?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 11:06 AM
HI,
If the workflow runs in system session then you should not have this issue.
To test this theory add a 1 second timer activity in the workflow right before this run scripts, that way the next activity should run on system session and not user session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 11:06 AM
HI,
If the workflow runs in system session then you should not have this issue.
To test this theory add a 1 second timer activity in the workflow right before this run scripts, that way the next activity should run on system session and not user session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2023 12:50 PM
Anurag,
That appears to have resolved this issue. Thanks for the quick response.