Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Hide section in demand form

prash4
Tera Expert

Hi 

can some one help me with a code to hide section (questionnaire) in demand form.

UI policy or client script ? 

 

prash4_0-1707746488262.png 

 

6 REPLIES 6

Not applicable

HI @prash4 ,

It would be a UI policy.

For example, to hide the "Incidents by Same Caller" related list on the incident form. 

Use the script below:
g_form.hideRelatedList('REL:70e80f390a0a0b1b0035a51d8bbfd32c');

Use script section on UI policy.

Please follow the link:

https://servicenowguru.com/scripting/client-scripts-scripting/hiding-related-lists-embedded-lists/

 

The Machine
Mega Sage

Here’s how to hide a form section. 

g_form.setSectionDisplay('<section_name>', false);

 

Hi @The Machine @Community Alums 

 

prash4_0-1707750447863.png

 

this is not working 

form section: this i need to hide on demand form

 

prash4_1-1707750506524.png