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

Mrudula6
Mega Guru

Hi Pavithra,



The New button is available to ITIL user as well. I have checked this on one of service-now's demo instance ServiceNow . Please chek if the Incident table has create ACL for ITIL users. Or check in list control for incident if the "new" button has any roles associated to it.



Thanks,


Mrudula


Andrii
Kilo Guru

Configure List Control within Parent Form Related List of Child Incidents


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


Ravi Prasad1
Tera Guru

Right click on the list header --> configure-> List Control   -- >uncheck the   New Check box and save.