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
Krishna Sahu 1Krishna Sahu 1 

Write a trigger to map filed.

I need your help in one scenerio like i have two object Lead and Account.
i create a lead and add values on fields and after that i convert that lead into account.But when i open account record so one field Email value is empty on account object so i need to write trigger ot that field please help me on this.
PriyaPriya (Salesforce Developers) 
Hey Krishna,

As per the standard functionality, on conversion of lead, emaiil will be updated only on Contact object. Also there is no standard email field on the Account object. 
However you want to do your own logic then you'll need to write a trigger on the lead object:
trigger LeadTrigger on Lead (before update) 
{
    for(Lead lead : trigger.new) 
    {
        if (Lead.IsConverted)
        {
            // do something with the converted leads
        }
    }
}

Additionally, you can programmatically convert leads in your apex code(http://salesforce.stackexchange.com/questions/17616/can-i-use-an-apex-trigger-to-set-a-lead-to-converted)

Please mark this as best answer if the information helps.

Best Regards,
Priya Ranjan
Krishna Sahu 1Krishna Sahu 1
Hello Priya,
Its my mistake replace the email field with birthday field.
Thank you
krishna Sahu