- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 03:15 AM
Hi All,
I have a requirement to create a parent incident on the basis of child incidents selected in the incident table by clicking a button in the banner with many to one relation(i.e. for multiple incidents selected one parent incident to be created). For one to one it is working with this in UI action -
var gr = new GlideRecord('incident');
gr.initialize();
gr.short_description = 'parent';
var id = gr.insert();
current.parent_incident =id;
current.update();
but I am not able to create for multiple. How can this be achieved??
Thanks in advance!!
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 11:46 PM
Hello Aritra,
Happy to know that my solution has helped you. I have updated a few more things like a confirmation popup, & an alert if records are selected.
Please go through the below article.
UI ACTION to create a parent incident on the basis of selected records[act as child incidents] from ...
Mark it as helpful & correct, If Applicable
Cheers..!
Happy Learning:)
Tushar
Cheers..!

Happy Learning:)

Tushar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 03:39 AM
Hello Aritra Gupta,
You can check the below thread to get some help.
https://community.servicenow.com/community?id=community_question&sys_id=0572604ddba61f00fece0b55ca96...
Cheers..!
Happy Learning
Tushar
Cheers..!

Happy Learning:)

Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 03:41 AM
Hi Tushar,
Thank you for your reply.
Checked that already it's not working.
If there is any other way please let me know.
Regards,
Aritra

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 03:52 AM
What's not working?
Can you share your configuration, not just the code?
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2022 04:07 AM
Hi Paul,
By following this link https://community.servicenow.com/community?id=community_question&sys_id=0572604ddba61f00fece0b55ca96...
I created a context menu and a script include
but post this the option is not getting visible anywhere. Even tried to give parent to the context menu record as "configure" still even there nothing new was added.
And for the code that I have mentioned it is working on one to one basis like for every child incident a parent is getting created and whereas I want one parent to be created for multiple child incidents.
Regards,
Aritra