- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 12:49 PM
How do you hide a form section? I've seen some saying to create a client script, but it's based of a specific condition. For example, if the value of this field is true, then hide the section. I don't have any conditions on hiding the section. I just want to hide it all together. Do I still need to create a client script? If so, what would the code look like?
Section name: Incident Management
Position: 7
Table: customer_account
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 01:09 PM - edited ‎06-04-2024 01:15 PM
Hi @MStritt Simply you can use onLoad Client Script on Account record/form and use below line of code
g_form.setSectionDisplay('incident_management', false);
Regards,
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 01:06 PM
Hi @MStritt,
You are correct, there is no need to create a script to hide a section if it needs to be hidden at all conditions.
Instead, you can hide the section by modifying the form view of the record.
Refer to this video for more details - https://www.servicenow.com/community/training-and-certifications/form-layout-and-design/ta-p/2306797
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 01:15 PM
Hi James,
I don't see in the video where it shows how a section can be hidden. When I go into form design, I can only delete the section.