Update fields inside a reference field with rest API (Similar to updatewithreferences() command).

avid
Kilo Expert

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?

6 REPLIES 6

Shreeharsh Basa
Tera Expert

for reference fields you have to pass the SysID not the value if you are updating or inserting values through script.

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.