Link case to incident

Hazel3
Tera Contributor

Hi

I need a script to implement the below use case:

When Incident is attached to the case

Then the respective related Case is shown on the Incident form via the case field.

Any suggestions?

11 REPLIES 11

mads2
Tera Contributor

What is the need for this direct link from incident to case?

 

There is an OOTB related list showing all cases where incident field is filled with the specific incident.

Hazel3
Tera Contributor

From case to incident?

Can you please explain

I am taking about incident form with the same case filled in the case field as per the screenshots.

I could see related list of incidents in case not in the incident i have created a reference field case and added in the incident form . Now i need to copy the incident number attached to case. When i open the same incident number the respective case number should be added. I thought it is an OOB functionality but that was not happening

 

 

 

 

mads2
Tera Contributor

Navigate to System Extension Points -> Scripted Extension Points.

Open sn_cs_sm.CSMIncidentIntegrations

 

Add your script to the example field in the function copyFieldsFromCaseToIncident()

Extension point.pngAfter creating navigate to the related list Implementation on the extension point and set the order higher than the OOTB implementation.

Extension point RL.png

 

Now the case will be added to your reference field on the incident table without customizing any OOTB scripts.

 

Doing this might give you trouble if you relate multiple cases to the same incident. So maybe it is sufficient to just show the Customer Cases Related list to the incident form?

Tai Vu
Kilo Patron
Kilo Patron

Hi  

The Incident field in the Case form is a Reference field type. That means 1 Incident can contains many Cases.

So when you update the Case which is linked to a specific Incident, it will display that Case under the Related List of the Incident.

TaiVu_0-1700021979140.png

 

Cheers,

Tai Vu

 

Hazel3
Tera Contributor

Hi,

Thanks for your reply

My requirement is to update the related record section as mentioned in the screenshot

incident.case_number = case.incident_number