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-17-2022 11:48 PM
Hello,
In the transform map please check if the run business rule checkbox is set to true.
Also make sure there are no transform script in that transform map which has the below syntax:-
setWorkflow(false);
Please mark answer correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 11:50 PM
Yes it is already true
and no transform scripts used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 12:00 AM
Your business rule condition is Manager_User_Id changes is this getting satified form the import?
Also what is the when to run after insert/update or before insert/update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 01:21 AM
after insert/update