function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dev perdev per 

How to handle email Aliases in workflow

Hi,

I am creating a workflow on a custom object. The condtion to trigger this workflow rule is when the status__c == 'Inactive' and custom__r.email ==email__c then send mail to custom__r.email .
custom__c is a look up field on USER and email__c is a email field.

The problem I have is to handle email aliases.There are two domain which actually are kinda same. for ex; abc@domainplus.com is same as abc@domain.com. but the above condition fails for these domain. How do i handle this?

Below is the code smaple I have:
AND(
ISPICKVAL(Status__c, "Inactive")
, custom__r.Email == Email__c
, NOT(ISBLANK(custom__c))
)
SonamSonam (Salesforce Developers) 
Is it the out-of-box functionality you are using? I tried this in my ORG and its checking for the complete email address..
dev perdev per
Thanks for the response!

I have created 2 workflows one to send only one email when custom__r.Email == Email__c and other to send mail to both email id's present in the field custom__r.Email, Email__c if they are different.

Our company has two domain or email aliases -- lets call it as user1@domain.com & user1@domainplus.com. Email sent to any of these mail ID will reach user1.
The field custom__c is a lookup to USER and can be accessed as  custom__r.Email, it will have standard email address(user1@domain.com).

but the field Email__c is a custom email field and is entered manaully so can have user1@domain.com or user1@domainplus.com.

So when custom__r.Email = user1@domain.com and Email__c = user1.domainplus.com, then I want  my first workflow to trigger and send only one mail (since user1@domain.com is same as user1.domainplus.com) which is not happening as custom__r.Email == Email__c  is not true.

So the second workflow with the below condition triggers and sends out two mail (one for custom__r.Email and the other Email__c ) which ends up as duplicate mails for same address.

AND(
ISPICKVAL(Stage__c, "SR Declined")
, Submitted_By__r.Email <> Sales_Rep_Email__c
)

Is there a way to handle this?