Hide a Form Section

MStritt
Tera Guru

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

1 ACCEPTED SOLUTION

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

 

View solution in original post

6 REPLIES 6

James Chun
Kilo Patron

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

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.