- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 08:32 PM
Hi all,
I cloned the 'My Approvals' widget in the Service Portal to allows users without the 'approve_user' role to action approvals.
// 1st changes on Server script
if (input.op == 'approved' || input.op == 'rejected') {
var app = new GlideRecord("sysapproval_approver");
if (app.get(input.target)) {
//var isMine = gs.hasRole("approval_admin") || (gs.hasRole("approver_user") && isApprovalMine(app))|| (isApprovalMine(app)); //Commented this
varisMine = isApprovalMine(app); //replaced with this
//2nd changes on server script
data.showApprovals = true;//Add this
//data.showApprovals = gs.getUser().hasRole('approver_user');//Remove this
From Service Portal widget, with the script changes above, user without role is able to approve from widget. But clicking into the RITM, approve / reject will return Update failed.
What did I missed?
This works:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 09:18 PM
Hi,
I believe both widgets are different, did you check 'Approval Info' widget?
You need to modify it and make required changes and test again.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2021 04:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2021 04:25 AM
Yes, I have implemented it as well, Please see the Link shared by "Ankur Bawiskar"