Assigning catalog task to user in "opened_by" field

gnunez
Kilo Guru

Hello all,

I am trying to assign a couple of catalog tasks to the the user in the Opened_by field. I've looked at other posts and I see many suggest to use task.assigned_to = current.opened_by and I added that script to the task.

My problem is that instead of the task assigning to "Opened_by", it assigns to the user who fulfilled the previous task. I also tried changing the display value for Request table from Number to Opened by, but that didn't make a difference.

Has anyone had the same problem or know how to fix this?

Thanks in advance!

1 ACCEPTED SOLUTION

Hi Grace,



This might me happening because the activity which is creating the task is getting invoked by the action to user who is completing previous activity(Previous task in your case). That is why assigned to is being set to the user who is closing previous task.



To Avoid this you can write   following line in your script and run it before insert.



current.assigned_to = current.request_item.opened_by;



Please Like, mark helpful depending on the impact of response.



View solution in original post

24 REPLIES 24

sagarsharma
Giga Guru

Hi Grace,



Check for the value in opened by field if it is what you want. Also instead of writing a piece of code in script, use set values tab in before business rule, select the field on left(Like assigned to) use "same as" operator and on right select "opened by" field.



Please Like, mark helpful depending on the impact of response.


Thanks for the idea I didn't think of that. I tested but it is assigning to the user who fulfilled the previous task. I don't if something is off or I'm doing something wrong.



I added the values as you suggested and added conditions on "When to run". You can see my changes in the screenshots below.



find_real_file.png


find_real_file.png


are you running this on insert or update ?


running this on insert


If I Understand correctly



Task A (Previous Task)


While Creating Task B it is assigning to Task A fulfiller instead of Task B opened_by?