event is triggering twice and getting duplicate emails for single update?

Shantharao
Kilo Sage

Hello All,

 

I have created one event called "asset.requisition.process.approved" and calling in business rules as below 

(function executeRule(current, previous /*null when async*/) {

var usr = current.variables.on_behalf_of_user_name;
var usrMangaer = current.variables.on_behalf_of_user_name.manager;
//gs.addInfoMessage("onBehalfOfUser ;" +usr+ "user's manager :" + usrMangaer);
if(current.variables.rollback_required=="yes"){
gs.eventQueue("asset.requisition.process.approved", current, usr,usrMangaer);
}
})(current, previous);

 

Based on the below conditions my business rule is running but triggering twice for single update any possibility to resolve the issue

 

find_real_file.png

 

Getting two emails at same time how can I trouble shoot this issue, what are the possibilities for getting duplicate emails or triggering same event in twice

  

Thanks

11 REPLIES 11

Hi Mike,

 

That event is called in only one business rule but duplicate mail is triggering

 

Thanks

Allen Andreas
Administrator
Administrator

Can you show what the BR actually does? Is there a script?

You'd want to check event log first to see if the event is firing twice...

Then look at the BR and see if there's something causing it to run over itself again or maybe there's a 2nd one setup.

You can also check and see your sys_email table for the email records to see if something else is firing those as you could potentially have two notifications....

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I have created one event called "asset.requisition.process.approved" and calling in business rules as below 

(function executeRule(current, previous /*null when async*/) {

var usr = current.variables.on_behalf_of_user_name;
var usrMangaer = current.variables.on_behalf_of_user_name.manager;
//gs.addInfoMessage("onBehalfOfUser ;" +usr+ "user's manager :" + usrMangaer);
if(current.variables.rollback_required=="yes"){
gs.eventQueue("asset.requisition.process.approved", current, usr,usrMangaer);
}
})(current, previous);

 

Based on the below conditions my business rule is running but triggering twice for single update any possibility to resolve the issue

 

find_real_file.png

 

Getting two emails at same time how can I trouble shoot this issue, what are the possibilities for getting duplicate emails or triggering same event in twice

find_real_file.png  

Thanks

Hello,

I'm not sure why you copied and pasted your entire post over again as I already saw it. Please read my response. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Tim Provin
Mega Guru

I would enable Debug Business Rules, and then go to a record and cause your business rule to fire (try to do it and "Save" the record so that you stay on it.  Then scroll to the bottom and check to see why your business rule is running twice.  Chances are there is another business rule that is triggering an update to the record again due to a current.update() statement.