Duplicate notifications for approval requests

Edward Rosario
Mega Sage
Mega Sage

Hello all,
I've been working on this issue for a bit and am running into a wall. the issue is that I have Duplicate "Request approval" email notifications being triggered when a request is submitted for approval. (see snapshot)

 

 

4 REPLIES 4

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Edward Rosario 

Greetings!

Is this duplicate mail happening only for one user?

If both mails are same (same content in notification) there could be any insert/update BR that is causing this.

If both mails are different then, it could be because of same notification filter conditions. 

please mark the answer as correct and helpful based on Impact.

 

Kind Regards,

Ravi Chandra

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

How does your email notification look like? Can you share details?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I have an advance condition

if (current.document_id.cat_item.name != "Corporate Credit Card Request" && current.sysapproval.cat_item.name != "Agreement Recovery" && current.document_id.cat_item.name != "New Store Setup" && current.sysapproval.cat_item.name != "Customer Charge Off List Removal" && current.sysapproval.cat_item.name != "Deferment Cap Lift" && current.sysapproval.cat_item.name != "RevRun 2 Device Relocation" && current.sysapproval.short_description != "Firewall Request" && current.sysapproval.short_description != "EPO Void" && current.sysapproval.short_description != "Technology Excellence Award Nomination" && current.sysapproval.short_description != "Position Request" && current.sysapproval.short_description != "Store Acquisition Service Request" && current.sysapproval.short_description != "Temporary Codes" && current.sysapproval.short_description != "Cycle Count Extension" && current.sysapproval.short_description != "FIeld Manager Offer Request" && current.sysapproval.short_description != "Slack Channel Request" && current.sysapproval_short_description != "Offer Request" && current.sysapproval_short_description !="Wage Withholding Request" && current.sysapproval_short_description !="Direct Ship PO Request" && current.sysapproval_short_description !="Enterprise Systems Access Request" && current.sysapproval_short_description !="Procurement Request" && current.sysapproval_short_description !="Request Item Approvals Reminder Notification")
{
answer = true;
} 


var catItemGR = new GlideRecord('sc_cat_item');
catItemGR.addQuery('name', current.sysapproval.cat_item.name);
catItemGR.addQuery('u_default_approval_notification', true);
catItemGR.query();
var recordProducer = new GlideRecord('sc_cat_item_producer');
recordProducer.addQuery('table_name', current.source_table);
recordProducer.addQuery('u_default_approval_notification', true);
recordProducer.query();
var contentItemGR = new GlideRecord('sc_cat_item_content');
contentItemGR.addQuery('u_table_name', current.source_table);
contentItemGR.addQuery('u_default_approval_notification', true);
contentItemGR.query();
if (catItemGR.hasNext() || contentItemGR.hasNext() || recordProducer.hasNext()){
	answer = true;
}

maroon_byte
Mega Sage

Check if one of your related Before business rule has current.update(). If so, remove it.