Update fields inside a reference field with rest API (Similar to updatewithreferences() command).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2019 02:19 PM
Hello.
I need to update fields within a reference record by rest API (Similar to updatewithreferences() command ).
I tried to send this body by rest API update to the incident table but with no success:
{"assigned_to.email":"example@gmail.com"}
Any suggestion?
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2019 06:41 AM
for reference fields you have to pass the SysID not the value if you are updating or inserting values through script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2019 08:13 AM
Thank you, But I didn't ask how to update a reference field but how to update fields inside the reference record.
FYI, it's not mandatory to pass the sysID of the reference, you can set the sysparm_input_display_value to true and pass the display value of the reference field.