Business Rule not working on import
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 11:42 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 01:35 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 01:47 AM
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.