How to set incident assignment group's manager in assigned to field on problem record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 04:18 AM
I have a requirement whenever i am creating a Problem from incident form, On problem record assigned to field should populate with Incident assignment group's manager .
can anyone help me on this?
Thanks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 04:26 AM
Hi @Hareesha ,
You can write a Business rule and dot walk to get the value of assignment groups manager of the incident, and set it into the problems assigned_to field. i.e..
// prob.assigned_to = current.assignment_group.manager;
prob = GlideRecord object for problem.
current = current record object from incident
Thanks, Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 10:44 AM - edited 06-10-2024 10:46 AM
Hi @Hareesha Write Before Insert BR on Problem table. Use below Script.
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', current.first_reported_by_task);
gr.query();
if (gr.next()) {
current.assignment_group = gr.assignment_group;
current.assigned_to = gr.assignment_group.manager;
}
Please mark my answer Correct/Helpful
Regards,
Sid