Display reference field value into string fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 02:23 PM
My script is not working:
var one = current.u_group.getDisplayValue();
var gr=new GlideRecord('sysapproval_approver');
gr.addQuery('document_id', current.sys_id);
gr.query();
if(gr.next())
{
gr.u_kb_group=one;
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 08:18 PM
Can we try with after insert BR on sysapproval_approver table with below code.
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('kb_knowledge');
gr.get(current.sysapproval);
current.u_kb_group = gr.getDisplayValue('u_group');
})(current, previous);
with Condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 08:49 PM
Hi Shishir,
Thanks to your reply....!
I will check and get back to you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 09:57 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 10:12 PM
Can you put some logs and check if it logs anything
gs.log('INKB');
var gr = new GlideRecord('kb_knowledge');
gr.get(current.sysapproval);
gs.log('KB Number' + gr.number);
gs.log('u_group' + gr.getDisplayValue('u_group'));
current.u_kb_group = gr.getDisplayValue('u_group');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 10:17 PM
Not getting any result.
I think , when we change group value in KB record that value should be copy into KBApproval table right.?