- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 02:14 AM
Hi All,
I have the requirement as follows
There is a company form with "Customer" View and I added a related list "Companies" - child company list
I have another Related List "Business Service
But I want this Related list to be visible only on Records that are on Child "companies" related list meaning when Parent is not empty.
Is there a way to achieve the same? like in a different view where "Parent" is not empty then show this related list.
Please let me know.
Thanks
@Ankur Bawiskar @Danish Bhairag2 @Sandeep Rajput @Tai Vu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 02:19 AM
Hi @DPrasna
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
11-22-2023 02:19 AM
Hi @DPrasna
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
11-22-2023 02:20 AM
You can sue UI policy.
https://servicenowguru.com/scripting/client-scripts-scripting/hiding-related-lists-embedded-lists/
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
11-22-2023 02:23 AM - edited 11-22-2023 02:29 AM
Hi @DPrasna
Let's define an OnChange Client Script on the Parent field.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (!newValue) {
g_form.hideRelatedList('cmdb_ci_service_business.company');
return;
}
g_form.showRelatedList('cmdb_ci_service_business.company');
}
Same for UI Policy.
Cheers,
Tai Vu