Changing field values with out saving/updating record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2020 10:58 PM
Hi Everyone,
In business rule, is there any way to change field values with out saving/updating record from script ? Please advise. Thank you.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2020 11:02 PM
Hi,
What is your exact requirement?
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2020 11:07 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2020 11:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2020 11:20 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader