Hide related list for other users and should only be visible to caller of incident record.

Shubh678
Tera Contributor

Let's say, I have a related list in incident form but I only want that list to be shown only for the user who is in 'Assigned To' field of that incident and list is hidden for every other user.

 

How many ways we can achieve this and what should be the best approach?

 

Any help will be appreciated!

 

Thanks in advance.

7 REPLIES 7

OlaN
Giga Sage
Giga Sage

Hi,

Easiest and quickest way would be to create a UI policy, and a UI policy related list action, that shows the related list only if the Caller is dynamic Me

Shubh678
Tera Contributor

Could you elaborate this a bit more. So, i can understand better.

 

And Could you please let me know the alternate ways as well. That would be great.

 

-Let's not say for caller, I would say a that related list should only be shown to a user who is in assigned_to field and it should be hidden to every other user.

 

Thanks in advance!

Hello,
You may have to utilize the scripting functionality [ OnChange. which should also run onLoad] or Run Scripts in the UI Policy configuration
add your conditions as\

if(g_form.assigned_to!=""&&g_form.assigned_to==g_user.userID())
{
 g_form.showRelatedList('related_list_table_name');
}
else{
g_form.hideRelatedList('related_list_table_name');
}

if your query is resolved then hit the thumb icon so as to close the thread.
Thanks

Sails
ServiceNow Consultant
United Kingdom

Shubh678
Tera Contributor

UI policy approach seems good over onChange client script. Let me implement this in my business use case and let you guys know about it and accept it as solution.

 

Appreciate your time!