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
us_mn04us_mn04 

How to find duplicate Contacts

Hi,

I am new to sales force and I am trying to create a page where I can find the duplicate 'Contacts' in my salesforce by using the name and emailId.

I would like it to be similar to the 'Find Duplicates' in the 'Lead' page.

 

I have tried to create a new page and then populate the fields by using the 'standardController' as contact. The problem I am facing is that to querry the database - I am thinking of  using a custom-controller. This means I cannot use the standardController feature for the web-page. If I use a custom-controller how can I access the email and name of the contact without passing them through the URL?

 

I am not sure if I am following the correct procedure for finding the contact duplicates. Please let me know how I should approach the problem.

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
wesnoltewesnolte

Hey

 

You've got a way to go, but you are headed in the right direction :) Within your custom controller you can select 1 or many contacts and return them to your page e.g.

public class myController{

public List<contact> contacts{get;set;}

 

public myController(){

contacts = [SELECT emailId, name FROM contact];

}

}

 Page

 

<apex:datatable value="{!contacts}" var="contact">

<apex:outputText value="{!contact.name}"/>

</apex:datatable>

 

 These basics should get you started.

 

Cheers,

Wes 

 

 

 

Message Edited by wesnolte on 06-12-2009 04:30 AM
Message Edited by wesnolte on 06-12-2009 04:30 AM

All Answers

wesnoltewesnolte

Hey

 

You've got a way to go, but you are headed in the right direction :) Within your custom controller you can select 1 or many contacts and return them to your page e.g.

public class myController{

public List<contact> contacts{get;set;}

 

public myController(){

contacts = [SELECT emailId, name FROM contact];

}

}

 Page

 

<apex:datatable value="{!contacts}" var="contact">

<apex:outputText value="{!contact.name}"/>

</apex:datatable>

 

 These basics should get you started.

 

Cheers,

Wes 

 

 

 

Message Edited by wesnolte on 06-12-2009 04:30 AM
Message Edited by wesnolte on 06-12-2009 04:30 AM
This was selected as the best answer
us_mn04us_mn04
thank you very much....
lightlight

I am Looking for the link to the Visual Force code sample for "fuzzy logic"  aka, "suggested duplicates" in this blog entry from 2008 - but i cannot find it anywhere.  -- have you seen it??

---

http://blogs.salesforce.com/ideas/2008/10/suggested-dupli.html

---
X - Salesforce Ideas Suggested Duplicates (Ideas Winter '09)

(feature is: when an idea is added to the online community, person posting idea, received a pop-up showing the suggested duplicates).  Nice, which it was implemented on our Customer community portal/ideas.

the blog shows the StartBucks example. Lovely example. But no link to code sample
At end of blog, it says:

"Suggested duplicates does a fuzzy match of the words you typed into the title box and recommends similar ideas, which the user might vote for or comment on instead.

This is a top feature request so we'll work on getting it into the standard UI in the next release, but once again for now it's just in Visualforce."

 

 

 

 
 


lightlight