that you'll have to hardcode or store it in some custom setting. You can access one in a formula thus: {!$Setup.CustomSettingName__c.CustomFieldName__c}
Your Salesforce org is owned by a company which owns an email domain like @abccompany.com . In a few cases you could have multiple domains. This you can directly mention in your validation rule. Why go to apex at all?
that you'll have to hardcode or store it in some custom setting. You can access one in a formula thus: {!$Setup.CustomSettingName__c.CustomFieldName__c}
All Answers
Use validation. Rules.. Try using regex function in your validation
Thanks Sam_SFDC15 for Reply.
Yes defiantly I can use validation but how can I get org email id company domain name so I can validate it with user entered email id.
If I want to find my org's domain name in apex coding than is it possible ?
Not sure what you mean.
Your Salesforce org is owned by a company which owns an email domain like @abccompany.com . In a few cases you could have multiple domains. This you can directly mention in your validation rule. Why go to apex at all?
Thanks LVS For reply...
so please if you have any sample validation rule to compare company domain name with user entered domain than plz post it..
suppose my org' s email with domain is hello@companydomain.com then i want to compare 'companydomain' with value which will be entered by user.
You can enter the below in the validation rule edit box. Pick your own error message.
NOT(CONTAINS( Email ,'@companydomain.com'))
Remember, when the above condition is TRUE that's when the validation rule fails and displays the error message to the user.
Hope this helps. Please mark this as a solution if it helped you.
LVS its clear to me. but my question is how to get '@companydomain.com'(Org's Domain Name)..?
Thanks..
Using 'Mass Email Lead' option for sending Email to particular Lead
Need help to track the click on the link (inside the email) by the Email receiver (only the count of Click on the link to be tracked)
Please Help
Warm Regards
Santhosh,
There's a simple solution. However, can you post this as a seperate thread please? Better helps other people. Thanks!