UI actions Create child incident; Solved!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday - last edited Thursday
Hello! this code is not working with the options I have selected. I am trying to create a child incident button using UI actions. I am using Xanadu. The "Create Child Incident" button is not showing on the incident form.
Any tips appreciated!
Hi! This problem has been solved! I figured out that the missing parts of the code was
var childID = cinc.insert();
so the entire code all together would be
var cinc = new GlideRecord('incident');
cinc.initialize();
cinc.short_description = current.short_description;
cinc.category = current.category;
cinc.subcategory = current.subcategory;
cinc.priority = current.priority;
cinc.work_notes = 'new incident has been created from ' + current.number;
var childID = cinc.insert();
gs.addInfoMessage('Child Incident has been created ' + cinc.number);
action.setRedirectURL(cinc);
0 REPLIES 0
