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.

How to change read only field as empty

spandana kalla
Tera Contributor

Hi Community,

 

Can anyone please say how to update a read only field as 'empty'.

spandanakalla_0-1704452653339.png

 

 

Thanks,

Spandana.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@spandana kalla 

what's your business requirement here?

if field is readonly then you cannot edit it

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

View solution in original post

7 REPLIES 7

Maik Skoddow
Tera Patron
Tera Patron

Hi @spandana kalla 

you can install the SN Utils Browser extension. Then double-click on the label "Substate" and remove the value. Last step is updating the form.

Maik

Ankur Bawiskar
Tera Patron
Tera Patron

@spandana kalla 

what's your business requirement here?

if field is readonly then you cannot edit it

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

@Ankur Bawiskar 

my business requirement is to make that field as empty .

 

Thanks,

Spandana.

@Ankur Bawiskar 

As it's read only , I s there any way to make it as empty. I am using this script but it's not working:

 

var tr = new GlideRecord('ast_contract');
tr.addEncodedQuery('numberSTARTSWITHCNTR0011651');
tr.query();
while(tr.next()){
tr.substate=''; // making values empty
tr.setWorkflow(false);
tr.update();
}