Why getDisplayValue() displaying sys_id instead of value for glide list type field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 09:37 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:38 PM
please share which field is marked as Display=true in the table being referred by field groupings
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:45 PM
it should work ideally
Did you try querying few records from this table and use getDisplayValue() function to see what it returns?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 10:54 PM
No, this table don't have any reference type field.