Business Rule Not running during data import

johndarroch
Tera Contributor

Trying to update a field that a created called supervisor with the full name from the user table . When I manually update the record it works fine but when I run the data source job the business rule does not run and I do have the Run Business Rule set to yes on the Transform Map.

Script

var inc = new GlideRecord('sys_user');

  1. inc.addQuery('employee_number',current.u_supervisor_id);

  1. inc.query();

if(inc.next()){

current.u_supervisor = inc.name;

      inc.update();

}

Thanks

6 REPLIES 6

Ishita Shrivast
Kilo Guru

Hi John,

Please go though below link, it will help you to pull full name from User table.

https://community.servicenow.com/community?id=community_question&sys_id=55768fe1db1cdbc01dcaf3231f96...

 

Please mark it as helpful and correct , if applicable.

Thanks and Regards,

Ishita Shrivastava.

DirkRedeker
Mega Sage

Hi

Maybe your BR IS run in fact, but:

Maybe your query does not find any records. This may be caused be some extra characters (like additional spaces) in your "current.u_superisior_id" field.

Please make sure, that your imported field will match the "employee_number".

Let me know, if that solves your issue and mark my answer as correct/helpful, please.

BR

Dirk