Create new Child incident from being on Parent

Pavithra36
Kilo Contributor

Hi All,

Please advise me on how to configure the option/button for creating New Child Incident from being on the Parent incident form. Once the Create New child is clicked, it should link to the existing parent on which we are currently in?

Can someone help me with the steps I need to follow in order to achieve this?   If anyone has done this, please share the script pattern for the same.

Awaiting your response.

1 ACCEPTED SOLUTION

1) If your requirement is to achieve it specifically via a UI button then have a UI Action with below code.


var inc = new GlideRecord("incident");


inc.initialize();


inc.short_description = 'Child Incident';


inc.parent = current.sys_id; //Relating the current incident as the parent


var sysID = inc.insert();



gs.addInfoMessage("Child Incident " + inc.number + " created");


action.setRedirectURL(inc);


action.setReturnURL(current);



2) You can also do this via the related list as Mrudula suggested. Personalize/Configure the list control and ensure the 'Omit new button' is unchecked.


find_real_file.png


find_real_file.png


View solution in original post

13 REPLIES 13

jbdevsn
Kilo Contributor

How would I go about inheriting certain fields from the parent to the child incident?


Hello Pavitra,

Are you able to connect the child and parent incident in this scenario. If yes can you please explain the process.

 

Thanks in Advance.

 

Jitendra

Does anyone know   how to create an indicator to differentiate parent and child incidents?


Mrudula6
Mega Guru

Hi Pavithra,



You can relate parent child using simple related lists. Follow steps below :



1. Open incident form


2. Right click banner and select personalize> Related lists


3. Select Incident -> Parent


4. click Save


5. Now beneath any open form, you can see an Incident tab in related list. Click on a new button and the new incident would be child incident to the current incident.



find_real_file.png



The new incident will have parent field populated.



find_real_file.png



Let me know if this helps.



Regards,


Mrudula Manjrekar


Hi Mrudula,



I tried this already, but this only works for system admin role and not for any other roles. So when I try to login as a Service Desk User, I only see the edit button there meaning, as a Service Desk user, I can relate two already created Incidents as Parent and child but cannot create a new Child Incident from Parent.



I had also given itil_admin role as well, but still did not work



Can you please check if the same behavior is observed for you as well?