- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:16 AM
Hi,
I have a requirement where I'm stuck with the workflow.I have a variable called 'offering' which a reference field of 'service_offering' table.Now I want to update the assignment group in sc_task form.The group I need to update is from the offering reference field where we have a field called L3 support group in service offering table if L3 support group is not empty it should update that in the task assignment group else it should update a field called L2 support group in service offering table.So this is the case. As the offering field is reference I'm not sure how to get the fields of that reference field through workflow catalog task.
Can someone help me with this!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:32 AM
Hi,
Try this script in advanced option - make sure to update with your fields/variables name.
var record = new GlideRecord("service_offering");
record.addQuery("sys_id", current.variables.offering);
record.query();
if(record.next()){
if(record.support_l3 != ""){
task.assignment_group = record.support_L3;
}
if(record.support_l3 == "" && record.support_l2 != ""){
task.assignment_group = record.support_L2;
}
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:32 AM
Hi,
Try this script in advanced option - make sure to update with your fields/variables name.
var record = new GlideRecord("service_offering");
record.addQuery("sys_id", current.variables.offering);
record.query();
if(record.next()){
if(record.support_l3 != ""){
task.assignment_group = record.support_L3;
}
if(record.support_l3 == "" && record.support_l2 != ""){
task.assignment_group = record.support_L2;
}
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 11:15 PM
Hi,
Have you tried this? or where you stuck, let us know?
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 08:23 AM
Hi,
Thank you for this. It worked perfectly