Wanted to show a New incident under 'Incidents Fixed By Change'  Related List on Change table

Rajamouly
Tera Expert

I have a customized field called' Incident' on the change form, when I add an incident to that field automatically it should show the incident in the 'Incidents Fixed By Change'  Related List.

 

 

Rajamouly_0-1668525026125.pngRajamouly_1-1668525146904.png

I know OOB when we add the Change request in the Incident form, then it will automatically show the incident in the 'Incidents Fixed By Change'  Related List.

 

Can any one help how to achieve this requirement?

 

2 ACCEPTED SOLUTIONS

Aman Kumar S
Kilo Patron

Hi @Rajamouly ,

Just to let you know, once you add the incident to the Change Request field on the incident form which resides in Related records section, it shows up in the "Incidents fixed by Change".

So if you want to show the incident selected on the change request form, the way to go would be to have a BR which updates the Change request field on the same incident.

Capture71.PNG

Let me know if this helps!

 

Best Regards
Aman Kumar

View solution in original post

I modified script like below, it is working fine.

 

(function executeRule(current, previous /*null when async*/) {
var inc = new GlideRecord('incident');
if(inc.get(current.u_incident)){
inc.rfc = current.getUniqueValue();// sys_id of change request
inc.update();
}
})(current, previous);

View solution in original post

12 REPLIES 12

I modified script like below, it is working fine.

 

(function executeRule(current, previous /*null when async*/) {
var inc = new GlideRecord('incident');
if(inc.get(current.u_incident)){
inc.rfc = current.getUniqueValue();// sys_id of change request
inc.update();
}
})(current, previous);

@Rajamouly 

So it remains the same. just changed the name of the field.

You have the option to mark multiple answers as correct in the new community, and If my responses helped you to achieve the requirement, feel free to mark it as helpful/correct.

 

Best Regards
Aman Kumar

Aman Kumar S
Kilo Patron

Hi @Rajamouly ,

Just to let you know, once you add the incident to the Change Request field on the incident form which resides in Related records section, it shows up in the "Incidents fixed by Change".

So if you want to show the incident selected on the change request form, the way to go would be to have a BR which updates the Change request field on the same incident.

Capture71.PNG

Let me know if this helps!

 

Best Regards
Aman Kumar