You need to sign in to do that
Don't have an account?
S_Batman
Converting Leads into Accounts based on custom fields
I have a custom field on the Lead level called Email Domain, as well as on the Account level.
Can someone help me create a trigger, where any Leads that have Lead Status = Open are converted as Contacts into Accounts if the Email Domain field on the Lead and Account matches.
For Example;
Lead
Name - John Smith
Lead Status - Open
Email - j.smith@abc.com
Email Domain - abc.com
Account
Account Name - ABC
Email Domain - abc.com
Then the Lead John is converted into a Contact that belongs to Account ABC
Can someone help me create a trigger, where any Leads that have Lead Status = Open are converted as Contacts into Accounts if the Email Domain field on the Lead and Account matches.
For Example;
Lead
Name - John Smith
Lead Status - Open
Email - j.smith@abc.com
Email Domain - abc.com
Account
Account Name - ABC
Email Domain - abc.com
Then the Lead John is converted into a Contact that belongs to Account ABC
this should get you started. You only need to append your additional logic on the "if" line of the trigger. if you're trying to convert leads not only on insert but also on upate then you will need to alter the trigger accordingly
Please check this code.
Any suggestions.. appreciated :)