I am not able to update the ready-only field

NAIDILE S
Tera Contributor

Hi,

I have a field called vendor rejection count (Read-only) on VIT, i want to update this field when the VIT is rejected by inbound call.
count is updating in log but not updating on the field.
I'm not sure where I'm goin wrong. Can anyone help me on that?

thanks,
Naidile

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@NAIDILE S 

is that field readonly at dictionary level?

how are you updating it? via GlideRecord?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Nilesh Pol
Tera Guru

HI @NAIDILE S 

Can you share your script for better understand the issue?

Or

Ensure that you are using the setValue() method in your server script to update the field.

 

Tushar
Kilo Sage
Kilo Sage

Hi @NAIDILE S 

 

Add gs.info("New Vendor Rejection Count: " + current.vendor_rejection_count); after updating the field to confirm it holds the expected value before updating.

if the field is read-only on the UI, it should still be updateable via scripts. If it's a calculated field, direct updates probably won't work.

 

Thanks,

Tushar

NAIDILE S
Tera Contributor

Hi @Ankur Bawiskar @Nilesh Pol 
-- >Ready only at dictionary level.
I see that they have used "GlideRecordSecure" so i was not able to update it .
is there any possible way with "GlideRecordSecure" to update ready only field?