Business Rule not working on import

Akki1
Tera Contributor

I have a custom table u_accounts

fields are:

User_id

first_name

last_name

Manager-String

manger_Identity-Refernce to self table(u_accounts)---not visible on form

Manager_User_Id-String---not visible on form

 

I have written after business rule on insert/update with condition Manager_User_Id changes

var gr=new GlideRecord('u_accounts');

gr.addQuery('user_id',current.Manager_user_id);

gr.query();

if(gr.next()){

current.manger_Identity=gr.getValue('sys_id');

}

current.update();

 

It is working fine if i submit using form but it is not working when i upload data in bulk

 

 

 

6 REPLIES 6

Just to be sure if the BR is not running or the code is not running

 

Can you put gs.info('test'); before the glide record and then run the import and see if the info got printed in the logs or not?

 

This will hep us to know if the BR itself is not running or the code is not running.

Maybe the BR is running but the script is not working once check the same and if BR is running but the script is not able to find the record maybe you can shift that script to on complete transform script.