- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 04:57 AM
I would like to copy below fields from Incident Record
- Short Description
- Description
- Assignment group
- Configuration Item
- Category
- Priority
- Impact
- Urgency
Please help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:58 AM
Hi,
This is possible with Flow Designer but since you have asked via Business Rule, I will answer you that way.
Check below business rule "When to Run
Nothing in Actions Tab
In Advanced, you can check the below Script.
(function executeRule(current, previous /*null when async*/) {
//get sys id of problem managnment group
// var sys_id_of_group="";
// var assignment_grp_sys_id=new GlideRecord('sys_user_group');
// assignment_grp_sys_id.addQuery('name',"problem_managnment_group");
// assignment_grp_sys_id.query();
// if(assignment_grp_sys_id.next())
// {
// //if(assignment_grp_sys_id.getValue('name')=="problem_managnment_group")
// //{
// sys_id_of_group=assignment_grp_sys_id.sys_id;
// //}
// }
// get current record from incident table
var inc_short_description = current.short_description;
var description=current.description;
var assignment_group=current.getValue('assignment_group');
var current_number = current.number;
var current_config_item = current.getDisplayValue('cmdb_ci');
//inserting record into problem table
var problem_create=new GlideRecord('problem');
problem_create.initialize();
problem_create.short_description=inc_short_description;
problem_create.description=description;
problem_create.assignment_group=assignment_group;
problem_create.setDisplayValue('cmdb_ci',current_config_item);
problem_create.category = current.category;
problem_create.priority = current.priority;
problem_create.impact = current.impact;
problem_create.urgency = current.urgency;
var psys_id=problem_create.insert();
//newly created proble sys is set in problem id.
current.setDisplayValue('problem_id',psys_id);
current.update();
//if problem is created then notification send to incident assignment group.
if(current.problem_id)
{
if(current.assignment_group!=null)
{
//notification send when the problem has been created
gs.eventQueue('bc_inc_assign_group_send_noti',current,current.assignment_group.manager.email);
}
}
})(current, previous);
Thanks
Dhananjay Kulkarni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:01 AM
@Riya Singh
You can create using after insert business rule on incident table
where in the BR you can set the condition to run only when Priority is Critical.
and you can copy the values using current.field_name
Thanks,
Murthy
Murthy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:08 AM
Agree, it can be done with BR. But, this is also where Flow Designer comes in handy.
It takes a minute to create there.
Make sure your trigger is set to run "once", so that it doesn't create new Problems each time an incident moves to P1 if it's deprioritized and then pushed up to P1 again - unless that's what you want of course.
If helpful or correct, please indicate so!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:58 AM
Hi,
This is possible with Flow Designer but since you have asked via Business Rule, I will answer you that way.
Check below business rule "When to Run
Nothing in Actions Tab
In Advanced, you can check the below Script.
(function executeRule(current, previous /*null when async*/) {
//get sys id of problem managnment group
// var sys_id_of_group="";
// var assignment_grp_sys_id=new GlideRecord('sys_user_group');
// assignment_grp_sys_id.addQuery('name',"problem_managnment_group");
// assignment_grp_sys_id.query();
// if(assignment_grp_sys_id.next())
// {
// //if(assignment_grp_sys_id.getValue('name')=="problem_managnment_group")
// //{
// sys_id_of_group=assignment_grp_sys_id.sys_id;
// //}
// }
// get current record from incident table
var inc_short_description = current.short_description;
var description=current.description;
var assignment_group=current.getValue('assignment_group');
var current_number = current.number;
var current_config_item = current.getDisplayValue('cmdb_ci');
//inserting record into problem table
var problem_create=new GlideRecord('problem');
problem_create.initialize();
problem_create.short_description=inc_short_description;
problem_create.description=description;
problem_create.assignment_group=assignment_group;
problem_create.setDisplayValue('cmdb_ci',current_config_item);
problem_create.category = current.category;
problem_create.priority = current.priority;
problem_create.impact = current.impact;
problem_create.urgency = current.urgency;
var psys_id=problem_create.insert();
//newly created proble sys is set in problem id.
current.setDisplayValue('problem_id',psys_id);
current.update();
//if problem is created then notification send to incident assignment group.
if(current.problem_id)
{
if(current.assignment_group!=null)
{
//notification send when the problem has been created
gs.eventQueue('bc_inc_assign_group_send_noti',current,current.assignment_group.manager.email);
}
}
})(current, previous);
Thanks
Dhananjay Kulkarni