How to create Incident and make case as its parent

Research
Tera Guru

Hi All

Can anyone help me with the requirement 
when we have created a case 
and created one incident how to make case as parent to this incident,

and custom field in incident is mandatory when incident moved to Resolve/ Close
Case can not be closed until child incident closed.

 

 

Please help with me script

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

There is a parent field out of box on incident field. You can just store the case sysid as parent in the incident.

You should also provide option as a related list under case for users to create incident from the case, which will bydefault make the case parent of the incident.

Then you need a business rule on the incident to abort action when someone is closing the case, if there are open incidents.


Please mark this response as correct or helpful if it assisted you with your question.

HI Sanjiv can you help me with script part?

@Research How are you creating incident from case? If there is a UI Action, then you can set inc.parent = current.sys_id+''; in the UI Action script field

 

Where inc is the GlideRecord object of incident and current is case record.