Hide sections on workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 06:25 AM
Hi Team please help me how to hide sections in service operations workspace based on assignment group.
I have created a ui policy and selected view as sow eventhough not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 06:57 AM
it should work fine provided you are giving correct section name and that section doesn't have mandatory field
share your client script config screenshots and what debugging did you do?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 07:04 AM
Please check this
  
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 07:17 AM
it worked for me
try to add alert and see if it went inside
function onLoad() {
//Type appropriate comment here, and begin script below
if (top.location.href.indexOf('/now/sow') > -1) {
alert('inside');
g_form.setSectionDisplay('related_records', false);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 07:43 AM
@Ankur Bawiskar alert is getting on load but section is not hiding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2025 07:47 AM
It worked for me -> did you check?
which workspace you are checking? you should use that in the script with it's prefix
I used sow and hence I added that
share what came in your URL?
Also any field is mandatory in that section? if yes then make that field non-mandatory and then hide
function onLoad() {
//Type appropriate comment here, and begin script below
alert(top.location.href);
if (top.location.href.indexOf('/now/sow') > -1) {
alert('inside');
g_form.setSectionDisplay('related_records', false);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
