assigning HR task to opened by user of HR case

griddhaluru  so
Tera Contributor

I have a requirement where I have to assign a HR Task to the user who opened the HR case . we have a field "opened_by" on the HR Case table.

For this I have written a assignment rule targeting Hr task table .

current.assigned_to = current.parent.opened_by;

but the user name is not updating in assigned_to field on task table.

What modification do I need to do to achieve this .

griddhaluruso_0-1711304062925.png

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@griddhaluru so 

for your logic to work your parent field should be populated and it should have opened_by populated

did you verify this?

Why to handle using assignment rule? you can simply use Before Insert BR

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @griddhaluru so ,

 

You can use a before Insert/update business rule on the HR Case table, with the filter "Assigned to" is not empty.

Business rule script should check:

For any HR tasks.

If HR tasks exist,

update the HR Tasks assigned to field with the HR Case assigned to value.


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect