Question with approval widget

suresh kaliappa
Tera Expert

Hi All , 

 

If there is any service portal developers i need your help here!

I am using approval widget in service portal page. But it was not displaying to end users in portal. To the user who has approval user or approval admin role it displaying. But In the widget the role field was blank and even in the server script i don't find any role restricting script. 

 

So i am unable to point out where the issue happening! Hence required someone assistance in this. I want to display the approval widget to all the end users. 

Kindly assist. 

 

 

1 ACCEPTED SOLUTION

suresh kaliappa
Tera Expert

The issue was in service portal widget there is one widget called " Approvals" if this widget was used in service portal page, Then if user do not have any roles and approvals then the widget was not displaying in service portal page. So to fix this only 1 line of code edited in approvals widget server script 

 

The single line of code : data.showApprovals = gs.getUser().hasRole('approver_user'); replace with data.showApprovals =true; 

 

The issue was fixed

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@suresh kaliappa 

What's your business requirement and why would you want end users to see approval widget?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

The business requirement is any user who has approval, That needs to display in service portal page. But right now only users who has approval user role can able to view the approval in service portal page. So that needs to be fixed 

@suresh kaliappa 

whoever has to approve/reject can OOTB see the My Approvals on portal and they can approve/reject from there

Why end user wants to see the My Approvals as they are not supposed to approve/reject?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Whoever has to approve/reject they are unable to see under my approvals in service portal page. only if user belongs to approval user role and the user is the approver of that request. Only that request was displaying under my approvals.