Facing Problem with creation of Script Action In flow designer

saibhanuala
Tera Contributor

Hello everyone,

I’m working on a requirement where all newly created cases should be automatically assigned to employees in the relevant department, instead of assigning them manually.

To achieve this, I’ve implemented a Flow Designer solution:

  • Step 1: I used a Lookup Records action to fetch employees based on certain conditions (like matching department and lowest current load). This part is working correctly, and I’m getting the desired output.

  • Step 2: I now need to update the original case record (in another table) based on the employee retrieved in Step 1. Specifically, I want to set the assignedto field with the  sys_id of the selected employee and optionally update their.

I’m facing difficulty in creating a Script Action to perform this update logic inside Flow Designer. I’d appreciate any guidance or examples on how to correctly implement this using a Script step or alternative method.

1 ACCEPTED SOLUTION

Hi @saibhanuala ,

 

you can use the Look Up record action instead of (look up records action)

 

with department condition

 

where table name is employee table name and order by current_load (a to z) low to high

 

here is an example on the incident table

ChaitanyaILCR_0-1753117034977.png

ChaitanyaILCR_1-1753117152483.png

 

you can use the datapill and directly set the assigned on from the lookup record action

 

 

with look up records action you have to use for each action to access but with this you don't need extra step and your requirement suites it

 

hope this make sense

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

View solution in original post

5 REPLIES 5

Hi @saibhanuala ,

 

you can use the Look Up record action instead of (look up records action)

 

with department condition

 

where table name is employee table name and order by current_load (a to z) low to high

 

here is an example on the incident table

ChaitanyaILCR_0-1753117034977.png

ChaitanyaILCR_1-1753117152483.png

 

you can use the datapill and directly set the assigned on from the lookup record action

 

 

with look up records action you have to use for each action to access but with this you don't need extra step and your requirement suites it

 

hope this make sense

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya