- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 02:56 PM
i have Group field(reference) in KB record so when i select the group name in KB record then that group name should be upadte in KB Group field(string type) of Approval table.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 02:12 AM
Hi Karthik,
Replace,
var one = current.u_group;
with
var one = current.u_group.getDisplayValue();
Thanks,
Maddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 03:00 PM
Write an after business rule on the knowledge record table and update the approver table with the group field accordingly.
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 03:02 PM
Hi,
i have written script , but not working..
var one = g_form.getDisplayBox('group').value;
var approve=new GlideRecord('sysapproval_approver');
approve.addQuery(document_id, current.sys_id);
approve.query();
if(approve.next())
{
approve.u_kb_group=one;
approve.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018 03:07 PM
See if this helps
Updated Script:
var one = current.group;
var approve=new GlideRecord('sysapproval_approver');
approve.addQuery('document_id', current.sys_id);
approve.query();
if(approve.next())
{
approve.u_kb_group=one;
approve.update();
}
g_form doesn't work server side.
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 02:01 AM
(function executeRule(current, previous /*null when async*/)
{
var one = current.u_group;
var approve=new GlideRecord('sysapproval_approver');
approve.addQuery('document_id', current.sys_id);
approve.query();
if(approve.next())
{
approve.u_kb_group=one;
approve.update();
}
})(current, previous);
Getting group sys_id, how can we display Group name here instead of " Group sys_id"