Skip to main content
When a lead is converted using the convert button i do not want the address in the lead to be mapped to account billing address.

 

It's urgent
20 answers
  1. Apr 26, 2016, 8:14 AM
    Amit,

     

    Please see below:

     

    trigger LeadConvert on Lead (before update) {

     

        for(Lead e:Trigger.New){

     

            Lead d=Trigger.oldMap.get(e.Id);

     

            if(e.IsConverted==true && d.Status <> 'Qualified'){

     

               e.adderror('Cannot convert lead');

     

               system.debug('Cannot convert lead');           

     

             }               

     

        }

     

    }

     

    Please check IsConverted of new record of Lead, try this one.

     

     
0/9000