- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Use Record Producer Script (Script tab on the record producer)
In your Record Producer → Script field, you can add logic after the Incident record is created:
(function producerScript(current, producer) {
// current = incident record being created
// producer = record producer variables
try {
// Create 5 incident tasks linked to this incident
for (var i = 1; i <= 5; i++) {
var task = new GlideRecord("incident_task");
task.initialize();
task.incident = current.sys_id; // link to the incident
task.short_description = "Follow-up Task " + i;
task.description = "This is auto-created task number " + i + " for Incident " + current.number;
task.assignment_group = current.assignment_group; // optional, reuse Incident group
task.insert();
}
} catch (ex) {
gs.error("Error creating incident tasks: " + ex.message);
}
})(current, producer);
OR
Use Business Rule (if you want this to apply for all incidents, not just this record producer)
Create a Business Rule on the incident table, after insert.
Add similar logic to insert 5 incident_task records.
⚠️ But this applies to every Incident creation (not just via the record producer).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You could actually achieve this completely no code by using flow designer with the trigger being one of the communication channels.
Please mark as helpful or if it’s resolved the issue, CORRECT!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Use Record Producer Script (Script tab on the record producer)
In your Record Producer → Script field, you can add logic after the Incident record is created:
(function producerScript(current, producer) {
// current = incident record being created
// producer = record producer variables
try {
// Create 5 incident tasks linked to this incident
for (var i = 1; i <= 5; i++) {
var task = new GlideRecord("incident_task");
task.initialize();
task.incident = current.sys_id; // link to the incident
task.short_description = "Follow-up Task " + i;
task.description = "This is auto-created task number " + i + " for Incident " + current.number;
task.assignment_group = current.assignment_group; // optional, reuse Incident group
task.insert();
}
} catch (ex) {
gs.error("Error creating incident tasks: " + ex.message);
}
})(current, producer);
OR
Use Business Rule (if you want this to apply for all incidents, not just this record producer)
Create a Business Rule on the incident table, after insert.
Add similar logic to insert 5 incident_task records.
⚠️ But this applies to every Incident creation (not just via the record producer).