Created
May 23, 2019 17:25
-
-
Save kbs5280/46720a7f74f128f8d099be929377256b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Boolean sendable(Lead newLead, Set<Id> scheduledLeadIds) { | |
Boolean isTestRecord = newLead.Email != null ? newLead.Email.contains('+ostest') : false; | |
if((newLead.Email != null || | |
Utilities.hasPhysicalAddress(newLead.Street, newLead.City, newLead.State, newLead.PostalCode)) && | |
(newLead.CreatedDate >= Datetime.now().AddYears(-3) || | |
scheduledLeadIds.contains(newLead.Id)) && | |
!isTestRecord && | |
newLead.Inbound_Call__c != Constants.NonSalesCall && | |
newLead.Inbound_Call__c != null && | |
newLead.ConvertedDate == null) { | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment