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

@suresh kaliappa 

they should have proper approval role and they should be able to see it

That user is not able to see My Approvals option in header or they are able to see but unable to see the approval record itself?

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

They are unable to see approval record itself under my approvals. Even my approval was not displaying 

@suresh kaliappa 

are they delegate of someone?

please share some screenshots

are they able to see the approvals in native left nav module -> My Approvals?

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

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