Setting assignment group on hr task thru assignment rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 01:23 PM
I am trying this in the script part with checking short description matching. This is not working. I have log statement in the beginning even that doesnt come thru. Any idea?
var grade = new GlideRecord('sn_hr_core_profile');
grade.addQuery('user', current.parent.subject_person);
grade.query();
while (grade.next()){
var answer = grade.u_pay_plan.getDisplayValue();
if (answer == 'AG'){
current.assignment_group= '123490401ba94a104ebb2171f54bcbb7';}
else {
current.assignment_group = '123438f81b39c690da5ddb1de54bcb27';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 03:56 PM
Hi @samadam,
Maybe it's scope related? If it's not already, create the Assignment Rule in the Human Resources : Core scope.
Also, try adding log at the beginning of the script. If you can't see the log, there is a chance that your Assignment Rule is not being triggered at all. If so, double check the condition.
Hope that gives you some direction.
Cheers