Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Community,
I am trying to hide the issues related list, when status is compliant and when status is non compliant then the issues related liste should be visible.
Below is the script, please review and let me know if there is anything wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ankitaayyad,
Instead of the client script following the best practice to use UI policy, I would recommend you go for UI Policy where you can select the visibility of Related List based on your selected condition.
If you need further modification, then you can use the client script, but if this is your only requirement, then the UI Policy is the go-to option.
Let me know what you think!!!
If you find my answer useful, please mark it as helpful and correct. 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ankitaayyad,
You can make UI Policy, add condition as Status is non compliant and in UI Policy Related List Action Related List, add your Related List and set Visible as true.
No code approach is best practice.
Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.
Kind Regards,
Ehab Pilloor