- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 03:33 PM
Hello All,
I've created an Insert and Stay function that was missing for one of our incident tables via a UI Action (see below). Essentially this will enable our users to duplicate incidents. I'd like to pass through the original case number into the comments, does anyone know if this is possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 04:34 PM
Hi @JW22 have you tried moving the incident.number to the bottom of the script. Here is the modified script
if (typeof current.number != 'undefined' && current.number) {
current.state = 1;
current.comments = "Incident duplicated from " + current.number // Add incident incident number here
current.number = ""; // generate a new incident number
current.insert();
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 04:34 PM
Hi @JW22 have you tried moving the incident.number to the bottom of the script. Here is the modified script
if (typeof current.number != 'undefined' && current.number) {
current.state = 1;
current.comments = "Incident duplicated from " + current.number // Add incident incident number here
current.number = ""; // generate a new incident number
current.insert();
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 10:44 AM
Thank you very much, this worked! I appreciate it.