setDisplay not working in client script

Rakesh50
Mega Sage

Hi,

 

I'm trying to hide the created and created by fields on newly creating record in custom scope table. It is not working.But when i applied setVisible, those fields are hidden but space is creating on the form. Is this scope issue ?

 

g_form.setDisplay('sys_created_on', false);
g_form.setDisplay('sys_created_by', false);

 

 

8 REPLIES 8

Vishal Birajdar
Giga Sage

Hi @Rakesh50 

 

You can  configure the form layout and remove that fields from form.

 

Is there any specific need you are hiding with script ...??

 

 

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Yes @Vishal Birajdar After submitting the request we need these fields info on record

Ankur Bawiskar
Tera Patron
Tera Patron

@Rakesh50 

share the screenshots.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar Please find the below screenshot

 

Rakesh50_1-1695735786297.png