Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

Community Alums
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