- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2023 05:13 AM
Hi All,
I have a requirement in Release form. We have a list collector variable and it contains few groups. When a release is created with any of these groups, a task should get created.
If the user selects all the groups, tasks should get created for each selected groups.
How to achieve this?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2023 05:51 AM
@User205031 to achieve this you need to write after insert the business rule to create task based on the group selection
You can below code for the same.
var groupList=current.glideListFieldName ;//glidelist group field name
var group=groupList.split(',');
for(var i=0;i<group.length;i++){ //depend on field value it will create that many task task other field can you set depend on your requirement
var taskGR=new GlideRecord('task_table_name');
taskGR.initialize();
taskGR.short_description="Task"+i+"created";
taskGR.group_field=group[i];
taskGR.insert();
}
Regards,
RJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2023 05:51 AM
@User205031 to achieve this you need to write after insert the business rule to create task based on the group selection
You can below code for the same.
var groupList=current.glideListFieldName ;//glidelist group field name
var group=groupList.split(',');
for(var i=0;i<group.length;i++){ //depend on field value it will create that many task task other field can you set depend on your requirement
var taskGR=new GlideRecord('task_table_name');
taskGR.initialize();
taskGR.short_description="Task"+i+"created";
taskGR.group_field=group[i];
taskGR.insert();
}
Regards,
RJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2023 12:19 AM - edited ‎01-18-2023 02:19 AM
Hello,
I tried with this script and working fine.
Thanks!