Why getDisplayValue() displaying sys_id instead of value for glide list type field?

Ankita Kolhe
Tera Contributor

Hi Community,

I have a glide list type field and I want to copy display value of that field to another field of string type.

 

I created a before- insert/update Business rule for the same with below code:

 

current.field1=current.field2.getDisplayValue();

gs.addInfoMessage(current.field1);

 

The above info message is displaying sys id instead of value.

 

Please someone help on this.

 

Thanks

30 REPLIES 30

@Ankur Bawiskar  Please find the screenshot below:

 

AnkitaKolhe_0-1735022141747.png

 

@Ankita Kolhe 

please share which field is marked as Display=true in the table being referred by field groupings

 

@Ankur Bawiskar Please find the screenshot below:

 

AnkitaKolhe_1-1735022611415.png

 

 

 

@Ankita Kolhe 

it should work ideally

Did you try querying few records from this table and use getDisplayValue() function to see what it returns?

No, this table don't have any reference type field.