assigning HR task to opened by user of HR case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 11:15 AM
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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2024 11:46 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 01:00 AM
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....