When I enter values in my task form and save, the values get cleared after saving.

CharanV66187530
Kilo Guru

Details:
I have not added any client scripts, UI policies, or server scripts that clear or reset the values. Despite this, the variables are still being cleared automatically after saving.

Request:
Can you help me understand why this is happening and how to fix it?

1 ACCEPTED SOLUTION

CharanV66187530
Kilo Guru

Thank you to everyone for your responses.

 

Someone on my project created a section and added a variable editor to the task form. As a result, we were unable to save the variable values. After deleting that section, everything is now working fine.

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron

@CharanV66187530 

which form? custom table or OOTB table?

any UI script is running?

what debugging did you do?

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

We have a UI policy that makes variables read-only on both the sc_task and RITM forms. I have a few mandatory variables on the sc_task form. When I set values and save the form, the values are not saved — they revert back to their previous state.

To troubleshoot, I deactivated those two UI policies.

The script on the UI policy is:


g_form.setVariablesReadOnly(true);

Tanushree Maiti
Tera Patron

Hi @CharanV66187530 

 

Which task form are you experiencing this issue with?

 

Was this working previously and has now stopped, or  have you been experiencing the issue where the value gets cleared after saving from the beginning?

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

It was working before, but now it’s not. Could you please help me with this?