Display value of reference field in BR is sys id when changed with table api

ahinterm
Tera Contributor

I have a BR on a table that runs when a record gets changed and part of it requires the display value of the items in a list field. When the field gets changed manually or with a script within the instance, it works as expected, returning the display value of the referenced records. When the field gets changed with the table API, the display value returned in the BR is the sys id of the referenced records. This behavior seems to only occur to the altered field, if there are multiple list fields and only one is changed, the remaining list fields are returned as expected.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@ahinterm 

share the business rule script.

Seems the user you are using in Table API authentication doesn't have read access to the field which is Display=true on the table being referred by that List field

Did you check that?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

(function executeRule(current, previous /*null when async*/) {

	gs.addInfoMessage(current.getDisplayValue('u_application_members'));


})(current, previous);

This isn't the exact script but the behavior occurs with just printing it. This occurs on a cmdb table. The referenced table has display=true and I'm able to get the display value in the return of the rest call