
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-17-2014 02:04 PM
We talked about several options on how users in our Call Center can have quick access to certain KB articles.
We landed on making a script that will add a bookmark when a users is added to the Call Center Group.
Here is a sample of that code that will only run 'on change' for the call center group
var grpm = new GlideRecord('sys_user_grmember');
grpm.addQuery('group',current.sys_id);
grpm.query();
while (grpm.next()) {
var chk = new GlideRecord('sys_ui_bookmark');
chk.addQuery('title','EscalationWorkflow');
chk.addQuery('user',grpm.user);
chk.query();
if (chk.getRowCount() < 1) {
gs.addInfoMessage('User: ' + grpm.user.getDisplayValue() + " Escalation Bookmark created " );
var p = new GlideRecord('sys_ui_bookmark');
p.initialize();
p.title = 'EscalationWorkflow';
p.user = grpm.user;
p.order = 999;
p.url = 'kb_knowledge.do?sys_id=09558ce7554fa90df865xxxc2f7351&sysparm_record_target=kb_knowledge';
p.image = 'images/icons/disputes.gif';
p.icon = 'icon-view color-red';
p.insert();
}
}
- 1,452 Views