- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2019 01:13 AM
Hello,
I have a requirement when Service Now gets an update to the BitLocker status field then it will create an incident for the support group for that computer. Can anyone please suggest me that where we can see the BitLocker status field in service now.
Can anyone please help me with this.
Regards,
Nivedita
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2019 07:32 AM
Hi,
Go to cmdb_ci.list and search with name --contains--locker and see if there is any record for bitlocker.
Yes, you can write business rule to create an incident. In BR, in when to run the condition can be status changes and in script field you may write below based on your requirement.
var incRec = new GlideRecord('incident');
incRec.newRecord();
incRec.short_description = 'bit locker status changed';
incRec.cmdb_ci = current.sys_id;
incRec.assignment_group ='sys_id_of_group';
incRec.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 08:21 AM
Hello Amaradiswamy,
Thank you for your reply and i have tested your code and it worked. It is creating ticket. One more thing i need to ask that in my requirement it is mention that it will create an incident ticket for the support group for that computer.
If no support group is found then it will assign the ticket to L2 help desk for proper assignment. So can you please suggest that how i can check this condition like when support group is available for the computer then it will create an incident for that computers support group and if support group not found for the computer then it would create ticket for L2 help desk.
Can you please help me with this.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 10:17 AM
Hi,
Sure, try with below.
if(current.support_group)
{
var incRec = new GlideRecord('incident');
incRec.initialize();
incRec.short_description = 'bit locker status changed';
incRec.cmdb_ci = current.sys_id;
incRec.assignment_group = current.support_group;
incRec.insert();
}
else
{
var incRec = new GlideRecord('incident');
incRec.initialize();
incRec.short_description = 'bit locker status changed';
incRec.cmdb_ci = current.sys_id;
incRec.assignment_group = 'sys_id of desktp l2 group";
incRec.insert();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 11:19 AM
Hello,
Thank you so much for your reply.
Here you are pointing to "current.support_group" So with this are you checking computers support group is available or not..right?
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 11:22 AM
Hello,
One more thing we need to create an incident for location xxx for now like When Bitlocker staus is Non-compliant and location of computer is xxx then it should create an incident.
Can you please help me with this.
Regards,
Nivedita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 12:50 AM
Hello Amaradiswamy,
One more thing i need to ask that for now i need to create an incident based on xxx location like When Bitlocker staus is Non-compliant and location of computer is xxx then only incident should be created.
Can you please help me with this.
Regards,
Nivedita