Auto populate assignment group on clicking UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 03:56 AM
Hi all,
We have a custom Candidate table, where a record is created though record producer. One of the fields in this Candidate form is Region- a choice field.
Once we open the Candidate record on application side, there is a UI action 'Create Task', which on clicking, opens a new Candidate Task form, where it needs to be submitted by filling a few fields.
One of the fields on this Candidate Task form is 'Assignment Group'. The ask is to auto populate this Assignment group field on the Candidate Task form- based on the Region field in the parent Candidate form, when the Create Task UI action is clicked.
For example- if the Region in parent Candidate field is APAC then on clicking Create Task, set assignment group to 'APAC group'; If Region is EMEA, then on clicking Create Task set assignment group to 'EMEA group' etc.
Please assist in how this can be done. Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 04:01 AM
Hi @Supratik3
You could do this through Assignment Rules - once the task is created - use assignment rules to assign based on the criteria. So initially there would be no assignment group until this rule runs right after: Defining assignment rules
You could also do it in the UI action, however this will take some scripting. You could reference the groups and have if statements if not too many, if there are many then assignment rules may be the way to go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 04:13 AM
I agree with @Hanna_G .
Please use assignment rule which is an OOTB feature.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 04:37 AM
Hi @Ankur Bawiskar , @Hanna_G ,
Thanks for the prompt replies.
However, since the assignment rule sets the group after submitting the Candidate Task form, and my requirement is the following: When I click 'Create Task' UI action (on parent Candidate form), it redirects to a new Candidate Task form, on which I need to auto populate the Assignment group as per Region field in the parent 'Candidate form'. -- i.e. Assignment group needs to be auto populated before submission of Candidate Task record.
Hence assignment rules is not suiting this purpose , and I'm leaning towards achieving requirement through UI action script on 'Create Task' button.
Request your inputs on the above, thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 04:56 AM
then when the Button is clicked, if you know the region then you can set the assignment group during the redirection to new record
what's the script inside that button?
share here
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader