- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:02 PM
Hello,
This is primarily for educational purposes.
Currently the following code populated the sys_id in the description. How do I it to display the ritm number instead of sys_id? Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:09 PM
@Keang ,Thanks for marking my answer as helpful. If it helped you in any way please accept the solution so that it will be beneficial to the future readers with the same query
Regards,
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:38 PM - edited 03-21-2024 02:40 PM
Hi @Keang,
while setting the value of description in business rule or in server side scripting set the number directly something as below,
var recSysId = current.getUniqueValue();
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('sys_id', recSysId);
ritm.query();
if (ritm.next()) {
ritm.description =ritm.number; //which field value you want, you can dot walk with that field backend name;
} else {
return false;
}
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:09 PM
@Keang ,Thanks for marking my answer as helpful. If it helped you in any way please accept the solution so that it will be beneficial to the future readers with the same query
Regards,
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 07:17 PM
Hi @Keang we have getDisplayValueFor(String, String, String) method for getting field value from server side can you check with this method.
If it's works mark Helpful.