When you use a custom visualforce page for your insert and new actions in Salesforce, the standard DC Duplicate Prevention doesn't work. By adding a some lines of apex code in your extension class, you can add Duplicate Prevention to your own customized VisualForce page.
Just add the following lines just before you execute the Insert or Update statement in your Apex Extension class.
Replace the **ObjectData** with the object you are adding or updating.
- You need to have the Advanced Edition of Duplicate Check for Salesforce.
- You have to use an extension class in your custom visualforce page.
- You need to use the following code
in your VisualForce page to display the Duplicate Warning message: