- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 04:38 AM
Hi,
I need to auto populate assignment group with default group field(custom) of creator(sys_created_by) and assigned to field with creator name.
Can someone please help me with this requirement.
Thanks in advance
Priyanka
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2023 12:40 AM
Thanks @Nilesh Pol1
Script should be dynamic and its should work for all assignment group and assigned to is not caller instead its a created by(field).
After BR worked well after glide record of user table and update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 04:44 AM - edited ‎08-22-2023 04:47 AM
Hi @Priyanka77
Try Insert After Business Rule as below:
current.assignment_group = current.sys_created_by.<Default Group field>;
current.assigned_to = current.sys_created_by;
current.update(); // Avoid it as not recommended but something does not work without it than try and see
Or your can try to achieve it without script also from Action section as below:
You can use your Default Group field instead of Domain. It was just for your reference.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 04:57 AM
Thanks for your response.
sys_created_by field is read only and not a reference type in incident and showing user id of creator not a name.
And in actions you have mentioned caller but i need to autopopulate creator details not caller.
Thanks,
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 05:32 AM
Hi @Priyanka77 ,
As per the best practice you can achieve this using customizing DBR.
Write an Display BR on required form(e.g. incident).
In action tab Set field values as per the scan attached.
mark this helpful if this help you to reach towards solution.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2023 12:40 AM
Thanks @Nilesh Pol1
Script should be dynamic and its should work for all assignment group and assigned to is not caller instead its a created by(field).
After BR worked well after glide record of user table and update.