- 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
‎07-05-2021 09:11 PM
Hello, this is wrong. You cannot do approvals on POrtal without the approval_user
role. And moreover, this has license cost associated with it hence it needs to be given to only higher
people in a hierarchy like managers and all.
Mark my ANSWER as CORRECT and HELPFUL if it helps
NOTE: for all OOB processes like Knowledge approvals/Change Approvals/Request Item approvals in order to approve it on the portal you would need this role , if you don't want to approve on the portal then maybe backend itil role will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 10:07 PM
Hi, in our organization, everyone can be approver, granting the role to everyone doesnt seems to be a good 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
‎07-05-2021 10:16 PM
check this KB link which talks about same issue
unless user has approver_user role they cannot update the record
Resolution
Possible solutions in order for the functionality to work as it was before:
1) Provide the user with approval_admin or approver_user role.
2) Clone the Approval Info Widget, modify the Server Script code (same code as before the upgrade) and add it to the Portal page.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader