Duplicate Prevention in VisualForce

Last published at: December 15th, 2025
Delete

Plauti Deduplicate's Duplicate Prevention in custom VisualForce pages is available in the Premium and PDM editions.

Apex code

Just add the following lines just before you execute the Insert or Update statement in your Apex Extension class.

    dupcheck.dc3Api api = new dupcheck.dc3Api();
ApexPages.Message prevention = api.doDuplicatePrevention(**Object**);
if (prevention != null) {
   ApexPages.addMessage(prevention);
   return null;
}

Replace **Object** with the object you are adding or updating.

Prerequisites

  • Have the Premium or PDM edition of Duplicate Check for Salesforce.
  • Use an extension class in your custom VisualForce page.
  • Use the following code in your VisualForce page to display the Deduplicate Warning message:
< apex:pagemessages escape="false"/ >