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

Ankur Bawiskar
Tera Patron
Tera Patron

@Hazel3 

what's your business requirement?

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

I have attached an incident to a case CS0012529. When i open the incident INC0522887 in the next tab the case number CS0012529 should be attached automatically. Linkage should be from case to incident.

Hazel3_1-1699963179123.png

 

any suggestion?

mads2
Tera Contributor

You can extend/override the ootb functionality that copy fields from case to incident. 

 

You need to create a new implementation in the scripted extension point named CSMIncidentIntegrations. In the field Example you see all the functions you can extend/override. You need to add your requirements to the function named

copyFieldsFromCaseToIncident(). When done click Create Implementation in the Related Links and set the order higher than the OOTB implementation. Then you will extend the functionality in the OOTB implementation of the copy fields functionality. 
 
Doing this can also be used to override existing functionality.
 
Be aware doing this will override the OOTB functionality in the copyFieldsFromCaseToIncident() function. So you might need to copy/paste the script from the OOTB implementation to your custom implementation in order not to lose all the OOTB-functionality to create incident from a case.