- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:45 AM
Hello Community,
How can I hide/show a particular related list for a certain group/user
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:48 AM
Hi @SnowUserDev
You create UI policy to show and hide the related list based on condition
Go through the below link :-
Sample Example :
Create UI Policy for the form with condition as field 'Action' is No.
To hide the related list Add the below code in the Execute if True script section.
g_form.hideRelatedList('related_list_table_name');
To show the related list Add the below code in the Execute if False script section.
g_form.showRelatedList('related_list_table_name');
Note: Get the related_list_table_name from thee list control of the related list. Right click related list header > Personalize/Configure List Control. Copy the value from the field 'Related list'
credits : @Community Alums
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0758509
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:48 AM
Hi @SnowUserDev
You create UI policy to show and hide the related list based on condition
Go through the below link :-
Sample Example :
Create UI Policy for the form with condition as field 'Action' is No.
To hide the related list Add the below code in the Execute if True script section.
g_form.hideRelatedList('related_list_table_name');
To show the related list Add the below code in the Execute if False script section.
g_form.showRelatedList('related_list_table_name');
Note: Get the related_list_table_name from thee list control of the related list. Right click related list header > Personalize/Configure List Control. Copy the value from the field 'Related list'
credits : @Community Alums
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0758509
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************