You need to sign in to do that
Don't have an account?
Biswajit Chinara
Block Case Creation in Salesforce
Hi Team,
Would like to know if there is a way where we can block emails to create cases in Salesforce if it triggered from 3rd party systems lower tenants.
3rd party lower tenant email address are: (xxx represents the domian name.)
Test1@xxx.com
Test2@xxx.com
Test3@xxx.com
Test4@xxx.com
Test5@xxx.com
.
.
Test25@xxx.com
Earlier 3rd party system had only 1 lower tenant email address, hence we wrote a validation rule to block the case creation.
Formula: AND(NOT(ISNULL(SuppliedEmail)),CONTAINS(SuppliedEmail,'Test1@xxx.com'))
Would like to know how to handle bulk the email addresses which changes based on 3rd paty system lower tenants number to block case creation. The common thing is this 3rd party lower tenant is the from address increases based on there tenant name.. Test1, Test2 ...... and ends with their unique domain name 'xxx.com'
Note: We can not put the STARTS with condition because there are other 3rd parties system are there where the email address is strating with Test..
A sample code snippet would be helpful.
Thanks !
Would like to know if there is a way where we can block emails to create cases in Salesforce if it triggered from 3rd party systems lower tenants.
3rd party lower tenant email address are: (xxx represents the domian name.)
Test1@xxx.com
Test2@xxx.com
Test3@xxx.com
Test4@xxx.com
Test5@xxx.com
.
.
Test25@xxx.com
Earlier 3rd party system had only 1 lower tenant email address, hence we wrote a validation rule to block the case creation.
Formula: AND(NOT(ISNULL(SuppliedEmail)),CONTAINS(SuppliedEmail,'Test1@xxx.com'))
Would like to know how to handle bulk the email addresses which changes based on 3rd paty system lower tenants number to block case creation. The common thing is this 3rd party lower tenant is the from address increases based on there tenant name.. Test1, Test2 ...... and ends with their unique domain name 'xxx.com'
Note: We can not put the STARTS with condition because there are other 3rd parties system are there where the email address is strating with Test..
A sample code snippet would be helpful.
Thanks !
Test1@xxx.com
Test2@xxx.com
Test3@xxx.com
Test4@xxx.com
Test5@xxx.com
.
.
Test25@xxx.com
In the EmailMessageHandler (Apex class invoked on trigger of Email Service), you will be obtain the instance of incoming Email Message. Check if the from Email Address is amongst the values in the custom setting.
If Yes
do not createCase
else
createCase
Thanks for your suggestion. While exploring solution got another workaround for the same using REGEX. Performing test scenarios with third party for our approach.
REGEX( SuppliedEmail,"^Test\\d+@xxx\\.com$")
Thanks,
Biswajit