Setting assignment group on hr task thru assignment rule

samadam
Kilo Sage

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';
}
}

 

1 REPLY 1

James Chun
Kilo Patron

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