- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2021 04:23 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2021 03:13 AM
Hi
Thanks a lot for helping and having patience. Finally, I am able to resolve this.
ac.update() will not work for saving(updating) values in table for reference field.
ac.updateWithReferences(); is correct method for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2021 04:27 AM
reference field require you to set "sys_id".
Mark my ANSWER as CORRECt and HELPFUL if it helps
if you don't know what sys_id is check this link
https://www.servicenowelite.com/blog/2020/9/29/ten-methods-to-find-sysid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2021 04:34 AM
I did same as u suggested but getting one error .
Unable to find workflow version for 0f670c8e1b23fb00b80e86ae6e4bcb0f (user=7e7721e4dbc04910347766d4059619ed)
I m running background script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2021 04:44 AM
Hi Harshal,
You can try using setDisplayValue() instead of setValue(), something like below:
var contractNumber = 'FSD1111';
gr.setDisplayValue('u_contract', contractNumber);
gr.update();
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2021 05:23 AM
will try it