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
ArunKumar KumkumathArunKumar Kumkumath 

Customize the Lead Find Duplicates Functionality in SF

Hi all,

Is it possible to customize the Lead Find Duplicates functionality ?

I have a new requirement from my client to add a custom page block and show some results from a REST API on the same landing page. I didn't see any salesforce out of the box feature for this.

As i am a beginner to this technology... please any one suggest some ideas to customize this...

Thanks in advance.
ArunKumar K
bilal malikbilal malik
This can only be achieved by using custom visualforce page. if you want to continue with this approach then you will have to override the "Find Duplicate" button with your custom visualforce page but there will be other functionalities like conerting lead, u will have to implement this too.
i hope, i made my point clear.

Mark this as best answer if it helped you.
ArunKumar KumkumathArunKumar Kumkumath
Thanks bibal for the reply...

Are you mentioning about the Merge duplicate functionality or Covert Lead... ?

Can i get some sample source code for this..
 
bilal malikbilal malik
By using custom visualforce page, you will have to make everything from scratch.
For example, there are buttons named "convert lead" etc , you will have to implement this too.. it's not a problem , you can easily convert lead using apex code.

Convert Lead Code:
       LeadStatus CLeadStatus= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1];
        List<Database.LeadConvert> MassLeadconvert = new List<Database.LeadConvert>();
        
        for(id currentlead: LeadIds)
        {
            Database.LeadConvert Leadconvert = new Database.LeadConvert();
            Leadconvert.setLeadId(currentlead);                
            Leadconvert.setConvertedStatus(CLeadStatus.MasterLabel);
            Leadconvert.setDoNotCreateOpportunity(TRUE); //Remove this line if you want to create an opportunity from Lead Conversion 
            
            //Get An Already Existing Lead , Account and Contact
            List<Lead> Leads = [Select Id,name,email,isConverted,LeadSource  from Lead where id =: currentLead];
            
            if(Leads.size() > 0)
            {
                if(Leads[0].isConverted == false)
                {
                    Database.LeadConvertResult Lcr = Database.convertLead(Leadconvert);
                }
            }       
        }


Mark this as Best Answer if it helped you.

 
ArunKumar KumkumathArunKumar Kumkumath
Hi Bibal,

Thanks... I have made the Convert Lead as custom by over riding the Standard Salesforce page.

But i did not get any break through for the Lead Find Duplicates..

Can you please share some examples on Find Duplicates.. ?