When Incident promoted to be Major Incident create Problem Automatically

Kishore47
Tera Contributor

When Incident promoted to be Major Incident create Problem Automatically

1 ACCEPTED SOLUTION

Deepak Shaerma
Kilo Sage

Hi @Kishore47 

try using business rule for creating problem record when incident is promoted to major incident.

Table: Incident
When to Run: After Insert/update
Conditon : Major incident state is Accepted
Script: 

 if (current.major_incident_state == 'accepted' && previous.major_incident_state !=='accepted') {
           var problem = new GlideRecord('problem');
           problem.initialize();
           problem.short_description = current.short_description;
           problem.description = current.description;
           problem.insert(); // Create problem record
       }

try with this code.

Note: Please Mark this as Helpful and Accepted also if this solves your query. 
Thanks & Regards
Deepak Sharma

View solution in original post

5 REPLIES 5

Jerry kk Wong
Kilo Sage
Kilo Sage

Hello @Kishore47 ,  As I understand it, your requirement is to create a problem record when an incident ticket is promoted to a Major Incident. Please let me know if any business rules have already been set up for this purpose. Also, please provide more details about the criteria that should trigger the creation of a problem record.

Hi @Jerry kk Wong , Thanks for your response. I checked with Business Rules but could not.

I can only create problem ticket through incident p1 by written after Business Rule ,but I am not able to create problem when incident promoted to be major incident.

 

Deepak Shaerma
Kilo Sage

Hi @Kishore47 

try using business rule for creating problem record when incident is promoted to major incident.

Table: Incident
When to Run: After Insert/update
Conditon : Major incident state is Accepted
Script: 

 if (current.major_incident_state == 'accepted' && previous.major_incident_state !=='accepted') {
           var problem = new GlideRecord('problem');
           problem.initialize();
           problem.short_description = current.short_description;
           problem.description = current.description;
           problem.insert(); // Create problem record
       }

try with this code.

Note: Please Mark this as Helpful and Accepted also if this solves your query. 
Thanks & Regards
Deepak Sharma

Thanks @Deepak Shaerma  Its Working