function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JD SpragueJD Sprague 

Setting custome account fields from Lead fields

I have Leads set up so that they are attatched to an existing account. In one of the account custom fields I want to map a custom lead field. I want to be able to map the Lead fields when it is saved, and whenever it is converted to an opportunity. I'm assuming this needs to be done with an apex trigger?
SonamSonam (Salesforce Developers) 
So I understand you wish to map the Lead fields and copy it over to the Account field when converting it to the Opportunity? if this is correct, you can do this using Map fields option in lead.
Go to Setup > Customize > leads > Fields > map Fields > Choose the custom lead field and map it to the Account field you want its value to be copied to.

Hoping I've understood the question correctly, if not, please help with an example
JD SpragueJD Sprague
Thanks for the response! I have mapped converted leads. What I am looking to do now is map leads that have been saved to an account but not converted. 

For example, I need to map a standard Lead field like status to map to a customized field on the account. I want this to happen whenever the lead is created or edited. But NOT just when it is converted. I hope this helps.