Business rule to prevent emails sending to system users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2015 06:30 PM
Hi folks,
I am trying to brainstorm the idea of creating a new business rule on sys_email table before condition, but wonder if anyone has thought of the similar idea.
Name: (Test) Prevent emails sent to users with conditions
Table: Email [sys_email]
Active: True
Condition: !current.instance.nil() && current.type=='send-ready' && current.weight > '0'
Script:
preventSendingEmails();
function preventSendingEmails() {
/* some conditions checking
Checking 1: Email contains NOADDRESS
Checking 2: Email contains DUPLICATE
Checking 3: Email notification = 1 (None)
*/
current.type = 'send-ignored';
}
Any input would be appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 09:55 AM
Thank you!! That worked brilliantly. Totally saved my butt for a meeting today to discuss this problem.