How we can create 5 incident tasks through a record producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
How we can create 5 incident tasks through a record producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
You can extend below logic to achieve this
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi there @Anshika Bhatna1
You can do this in the record producer’s script. After creating the incident, just loop and insert 5 tasks linked to it. like this):
var inc = new GlideRecord("incident");
inc.initialize();
inc.short_description = producer.short_description;
var incID = inc.insert();
for (var i = 0; i < 5; i++) {
var task = new GlideRecord("incident_task");
task.initialize();
task.short_description = "Task " + (i+1);
task.parent = incID;
task.insert();
}
Hope this helps.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Anshika Bhatna1 ,
Since, Record Producer create single record in ServiceNow, want to create 5 incidents tasks You can do it by record producer script or flow designer once request submitted.
Please mark helpful & correct answer if it's worthy for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours 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!