g_form.hideRelatedList: How to hide all or specific related lists in service portal?

G_38
Mega Expert

So anyone know what parameters to enter to hide catalog tasks, approvals, and group approvals in the service portal?

I was able to use g_form.hideRelatedList("task_sla.task");to hide this in Incident form but now I need to know what to enter for these specific ones for request.

Also is there a way to hide the save button on this form as well in the service portal?

 

find_real_file.png

1 ACCEPTED SOLUTION

I found that article to solve my incident issue but didn't realize i had to use a gform for each table. This is how i solved it.

 

find_real_file.png

View solution in original post

4 REPLIES 4

Bhagya Lakshmi
Mega Guru

Hi,

Do you want to hide all related lists or only those 3?

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

here you will find how to do it:

https://community.servicenow.com/community?id=community_question&sys_id=fcfcf77edb435f082be0a851ca96...

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

I found that article to solve my incident issue but didn't realize i had to use a gform for each table. This is how i solved it.

 

find_real_file.png

Hi. I'm trying this one but I can't seem to make it work. I'm on a scoped app and this is my Client Script:

find_real_file.png

I want to hide the related list if the user doesn't have the role needed. The role check is successful since I've been seeing the alert. And when I set the UI Type to Desktop, I saw that the related list was hidden but I can't seem to make it work on the portal.