multiple tickets in one record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2024 11:47 PM
Hi Team,
I have requirement like Iam creating hr case through record producer, but I need to create one more ticket with same values but different assignment group. Please suggest me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2024 12:18 AM - edited ‎07-18-2024 12:20 AM
You can also do something like this in your RP script:
// Create the additional record
var gr = new GlideRecord('incident'); // Example
gr.initialize();
gr.short_description = producer.short_description;
gr.description = producer.description;
gr.insert();
This may come with a minor issue in that it will only create the variable records for the initial record but this wont be a problem if you aren't using the variable editor formatter on your target record which I suspect you wont be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2024 12:27 AM
You could combine this with what SN_Learn said and do something like so:
current.assignment_group = "GroupSysID";
If(producer.catering_required == 'yes'){
// Create the additional record
var gr = new GlideRecord('incident'); // Example
gr.initialize();
gr.short_description = producer.short_description;
gr.description = producer.description;
gr.assignment_group = "GroupSysID2";
gr.insert();
}
