Last active
May 23, 2019 17:23
-
-
Save kbs5280/dca0ecb5c94ecf366aa018d470ee000e 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
List<String> notSendableResults = new List<String>{Constants.DoctorDeclined, Constants.NotCandidate, Constants.ReceivedElsewhere}; | |
Boolean isTestRecord = account.PersonEmail != null ? account.PersonEmail.contains('+ostest') : false; | |
if((account.PersonEmail != null || | |
Utilities.hasPhysicalAddress(account.BillingStreet, account.BillingCity, account.BillingState, account.BillingPostalCode)) && | |
(account.CreatedDate >= Datetime.now().AddYears(-3) || | |
scheduledAccountIds.contains(account.Id)) && | |
!isTestRecord && | |
!notSendableResults.contains(account.Consult_Result__c)) { | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment