You need to sign in to do that
Don't have an account?

Create a account field on leads record
Hi All,
I want to check if there is a way, I could create a custom field on lead object called "Account" and this field populates ever time a new leads comes in to salesforce, the Account field should populate a associated existing account based on matching email criteria.
Thanks
I want to check if there is a way, I could create a custom field on lead object called "Account" and this field populates ever time a new leads comes in to salesforce, the Account field should populate a associated existing account based on matching email criteria.
Thanks
can you explain where you want to populate.
As per my understandind based on question use Lead Auto Response Rule. Mention criteria in that,it will send notification.
If it is not that requirement Please let me know.
I wanted to create a new custome field on Lead Object.
So the requirement is:
- New lead comes in and the email address is xyz@gmail.com
- Custome field needs to search for a account which has the same email id (xyz@gmail.com) In Account object and if it find a acount with the same email, populate the new custome field with that account link
Hope I made it clearn this time. Please, let me know if its still confusing.You can create a trigger with something like Of course, it would need to be bulkified and follow best practices, but that is the general idea.
Regards,
John
Yes you can create a trigger that checks Lead-email with account and fetch that account record in Lead custom field .
You have to do sothing like this :
1. Create lookup field in Lead.
2.Create Trigger fetch the account record when {!Lead.Email}=={!Account.email}
I hope it will help you if not please let me know.
Try using the following trigger,
I am assuming you have Email__c as a custom field on an Account object and Account__c custom field on Lead object.
What this trigger does it whenever you enter the lead and if the lead has an email and there is no Account attached to it yet then it will go and find an account for it based on the similar email address.
If you enter a Lead with the email and you have already provided an account for it then the trigger won't override that account. Trigger works only for the Leads who has email address and who has their account field blank and also whoes email matches with the one o the Account's email in database.
Hope this helps & if it solves the query then please mark it as best answer. Thank you!
Thank for responding back.
I'm new to this, so not able to make the best use of your suggestions.
Govind, The Email field on Account is a Standard field. and we get all our leads from the web. your solution would work perfectly but then, the Email field on account is Standard and not custom.
Email is NOT a standard field on the Account object. It is a standard field on the Contact object. The Contact object has a standard Account field. Unless you create a custom email field on account, you will have to search contact records to get the AccountId to save to your custom account field on the lead.
Regards,
John
What you say is true but, for a business account. When a org is enabled for Person account, Field from Contact Obj also become a part of Account Obj.
Regards