I'm trying to determine if there is a way to prevent cases from being created from Email2Case if the origination email address comes from a certain domain. So for example, if I'm talking about the domain hotmail.com, I want to create a trigger that prevents a new case from being created by Email2Case.

Would I need to create a new field that "finds" the domain portion of the email address? I thought there might be a way to do a "like" or "contains" but I can't find any logic that supports either of those.

Thanks in advance for any suggestions you guys might have!

  • Trigger or validation rule could both work, as far as I can tell. Are you using the OOTB email to case, or your own handler? – sfdcfox Jun 18 '14 at 18:34
  • 1
    why not Validation Rule: CONTAINS(LOWER(SuppliedEmail),'@hotmail.com') ? Email2Case sets Case.suppliedEmail; Validation Rules wil prevent the Case from being inserted - although it is a blunt instrument here - no hotmail.com case will ever be accepted – cropredy Jun 19 '14 at 1:33
  • We're using the default Email2Case that comes with Salesforce. I added your suggested validation rule, crop1645. Thank you both for your help! – grimsvotn Jun 19 '14 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.