CLient side validate CAB approvers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 07:49 PM
Hello all,
Good day!!
My requirement is Change request when moved to CAB state, then only CAB approvers needs to edit a field (u_xyz)
So, for this I have written a Script Include and on Change Client script.
So, the script include will be returning an array consists of all sys_ids of CAB approvers.
And at on Change client script the answer is giving all these sys_ids as expected.
Now, I want to check one by one sys_id with the logged in user of service-now.
So, can someone tell me how can we do this?
Regards,
Lucky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 07:53 PM
Hi @Lucky1
have you tried an ACL for your requirement? From your requirement, i think field level ACL would be best fit.
If you want to go with client script and script include then you need to validate logged in user with your array of sys_ids in script include itself and return yes or no to the client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 08:06 PM
Yes Swapna,
If you want to go with client script and script include then you need to validate logged in user with your array of sys_ids in script include itself and return yes or no to the client script.
----> For the above one, can you give me logic please?
Regards,
Lucky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 08:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2025 09:04 PM - edited 03-16-2025 11:30 PM
Hello Swapna,
In the Approvals (sysapproval_approver) table, is there a way to get the groups where the approvals will be triggered to?
Because, for me the CAB approvals are getting triggered to multiple groups.
So, I want to return all those groups.
Regards,
Lucky