- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 05:27 AM
Hello Everyone,
I want to populate a field name which is present on u_bsa table.
On u_bsa table i field named as Req for which was dot walk by sc_req_item table, i want to display that Req for field name for which i written a script like below
i am getting a display value as undefined
var ritm = new GlideRecord('u_bsa');
if(ritm.get(current.sysapproval)){
var req_for = ritm.u_requested_for.name; //Output i am getting is undefined
var ge = ritm.u_requested_item.number; // I am getting correct output here
gs.addInfoMessage(req_for);
gs.addInfoMessage(ge);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 06:10 AM
Try
var req_for = ritm.u_requested_item.u_requested_for.getDisplayValue()
Manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 05:38 AM
Is u_requested_for a reference field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 05:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 05:39 AM
Hello Shaik,
Please provide more info :
- The type and the table de Business Rule (Approval ?)
- Why do you think the "u_bsa" is "current.sysappoval" ?
- Are sure do you enter the "if" statement. if yes, please make sure you use the correct syntax. else put a log meessage in the 'if' statement to make sure you're in
Can you try to print the sys_id of the "u_bsa" record (e.g. gs.addInfoMessage(ritm.sys_id) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 05:45 AM
I can able to pring the sys_id of u_bsa table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 06:10 AM
Try
var req_for = ritm.u_requested_item.u_requested_for.getDisplayValue()
Manish