creation of ScTask with assignment group based on user location

tsai25044
Tera Contributor

 

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.

 

 

2 REPLIES 2

The Machine
Kilo Sage

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.

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