Link case to incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2023 03:47 AM - edited ‎11-14-2023 04:40 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2023 08:53 PM - edited ‎11-14-2023 09:23 PM
Hi @Hazel3
You can achieve this by implementing an After Business Rule to update the associated Incident record.
Sample below.
var grIncident = current.incident.getRefRecord();
grIncident.<your_field_name> = current.getUniqueValue(); //replace your Case field name
grIncident.update();
However, consider the scenario where a second case is linked to the same Incident, or when users unlink the Incident from the Case.
How would you like to handle such cases?
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2023 11:08 PM - edited ‎11-16-2023 11:11 PM
Hi, By default there is no OOB field available to display the case number in the incident but OOB has having related list tab is available to display the case number in the incident form. I hope it will be usable for your scenario. Pls refer below diagram it will represent the relationship between Incident and Case as per OOB. Any reason it's not sufficient you should create a custom field and populate the case number - it's not advisable.
If you feel the report aspect then create a report based on the case table and put a filter condition as the incident is not empty.
Suresh.