Updating field via integration not working with Display Value

Vinicius2
Kilo Sage

Hi Everyone,

 

I have an integration with LeanIX running on my instance. They want to start using a field called "Platform Host," which is a reference field. The system sends the display value to ServiceNow, and while the value is being set in the reference field, it's not properly referencing the record. Please refer to the screenshots for a clearer understanding.

Vinicius2_0-1736889394172.png

When I use SN Utils to check the value, it shows the same name as the reference record.

Vinicius2_1-1736889446180.png

Vinicius2_2-1736889490272.png

 

Does anyone know what could be causing this?

 

 
1 ACCEPTED SOLUTION

MackI
Kilo Sage

hi @Vinicius2 

 

I believe you are well and good.

 

Okay, I understand the issue. You have a LeanIX integration that's sending the display value of a referenced record (e.g., "Vehicle Update Service Platform") to populate the "Platform Host" reference field in ServiceNow. Although the display value appears in the field, the actual reference to the target record is not being established correctly.

Here's a breakdown of the likely causes and how to fix this in your ServiceNow integration:

Why this is happening

Reference fields store sys_ids: Reference fields in ServiceNow fundamentally store the sys_id (a unique 32-character identifier) of the referenced record, not the display value.

Display value is for human readability: The display value (like "Vehicle Update Service Platform") is what's shown to users, but it's not used for the internal linkage.
Integration is sending the display value instead of sys_id: Your LeanIX integration is likely sending the display value in the payload for the "Platform Host" field. ServiceNow is trying to be helpful by showing this value, but it doesn't have enough information to resolve it to the correct sys_id.

How to fix it

You need to modify your integration so that ServiceNow receives the sys_id of the referenced record from LeanIX. Here are the general approaches, with more specific steps depending on your integration method:---


1. Modify LeanIX to send the sys_id (Recommended):

Best Solution: The ideal solution is to change the LeanIX integration so that it sends the sys_id of the "Platform Host" record in the payload to ServiceNow. This is the most reliable way to establish the reference.
How:You'll need to work with your LeanIX administrator or consult the LeanIX API documentation to determine how to retrieve and include the sys_id in the integration payload.
The specific steps will depend on how your LeanIX integration is configured (e.g., custom scripts, middleware, etc.).

2. Lookup the sys_id in ServiceNow (If you cannot modify LeanIX):

How: If modifying LeanIX is not feasible, you can add a step in your ServiceNow integration logic to look up the sys_id of the referenced record based on the display value received from LeanIX.
 
For this you need a Transform Script.
 
If you like this opinion and your problem is resolved after reviewing and applying it. Please kindly mark this your best answer(Accepted Solution)🌠‌ OR  mark it  Helpful ‌‌ if you think that you get some insight from this content relevant to your problem and help me to contribute more to this community
MackI | ServiceNow Developer | 2 *Mainline Certification | LinkedIn Top IT Operation Voice 2023 | Sydney,Australia

View solution in original post

5 REPLIES 5

Hello Ankur,

I am using the scripted Rest API from the LeanIX plugin.

API definition: LeanixREST
Name: Update