You need to sign in to do that
Don't have an account?
Compare field on Lead to all values in corresponding field on Account
I am thinking that Apex is my only hope for this, but if this can be done without let me know!
I have a formula field on the Lead that pulls the email domain (i.e. gmail.com) (Email_Domain__c) from the email field. I have a field on the Account that contains the primary email domain via a text field (Primary_Email_Domain__c).
When a Lead is created, I want to compare the Lead's Email Domain to all Primary Email Domain Account field values to find a match and then assign the Lead to the Account Owner for conversion.
Please and Thanks!!
I have a formula field on the Lead that pulls the email domain (i.e. gmail.com) (Email_Domain__c) from the email field. I have a field on the Account that contains the primary email domain via a text field (Primary_Email_Domain__c).
When a Lead is created, I want to compare the Lead's Email Domain to all Primary Email Domain Account field values to find a match and then assign the Lead to the Account Owner for conversion.
Please and Thanks!!
https://salesforcesidekick.com/2015/12/21/match-leads-to-an-account-automatically-with-an-account-number/
Regards
All Answers
You need a VLOOKUP but that is impossible with a formula (excepted for validation rules and with a very limited use).
The "zero code" alternative for VLOOKUP are not only the Apex code.
You should consider Flows and Process Builder.
With some clics, you could get your result without writing a line of code
Sample Flow That Loops Through a Collection:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_designer_example_loop.htm
Start a Flow with a Process:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_distribute_system_process.htm
If you are not comfortable with the flows, a underused tool designed for administrators which can replace the apex triggers in many cases, there are many trailhead projects:
https://trailhead.salesforce.com/en/projects/flow_calculate/steps/flow_calculate_determine
There are the record lookup and the fast lookup
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_designer_elements_fast_lookup.htm
You just need a little help for creating the flow itself probably (the less intuitive part). The process (lightning process builder) will be the easy part (very intuitive).
Regards
The champion of the "flows" is David Litton, a Visual Flow expert (currently working as a Solutions Architect at Ad Victoriam Solutions) :
https://salesforcesidekick.com/flows-in-action/
He solved complex problem with only flows and processes.
Regards
https://salesforcesidekick.com/2015/12/21/match-leads-to-an-account-automatically-with-an-account-number/
Regards