Changing field values with out saving/updating record

Gowtham29
Tera Expert

Hi Everyone,

In business rule, is there any way to change field values with out saving/updating record from script ? Please advise. Thank you.

5 REPLIES 5

Dhananjay Pawar
Kilo Sage

Hi,

What is your exact requirement?

Thanks,

Dhananjay.

The SN Nerd
Giga Sage
Giga Sage

Do you mean updating a field but update the record silently?

current.setValue('field',field);
current.setWorkflow(false); // do not trigger any business rules to run
current.autoSysFields(false); // disable the update on sys_updated_on, sys_updated_by, sys_mod_count etc.
current.update();

If you just want to change the value of a field on a form and not save the record, use Client Script:

g_form.setValue('field',value);

ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Jaspal Singh
Mega Patron
Mega Patron

Hi Gowtham,

 

Yes, you can we have the Actions tab available which can be directly used rather than scripting if you are aware what nees to be the values.

find_real_file.png

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Gowtham,

you can set the value using client script if the field is present on form but it won't be saved to the database unless you click save or update button

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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