creation of ScTask with assignment group based on user location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 03:27 AM
Hi experts ,
There is a field called" Recipients Name " in the form on maintain items. When user submits the form two Sctask need to create using workflow .
First task need to create based on user location and assign to user location assignment. For example if user is from IND assignment group should be desktop -IND .
I tried a code in task on workflow selecting advance option.
if(current.variable.recipients_name.user.location == "SYSID OF LOCATION"){
task.assignment_group = 'SYSID OF GROUP';
}
Even tried by replacing user.location with user.cmn_location No use .
Can anyone help me on this requirement.
Regards,
sai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 07:14 AM
Is recipients a list or a reference field? If its a list, you'll need to do an additional lookup as you only get sys_ids. If its a reference you should be able to dot walk like normal.
Then query the sys_user_group table based on the location of the recipient and set it based on the results of the group query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 07:18 AM
Hi @The Machine
the recipients is a reference field i.e; sys_user .
Now i need to write code in the workflow in create task . Can you please semd me the code.
Thanks