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

How can I write a simple Validation rule to stop duplicate data getting into the system

I am creating an events booking system with the Salesforce platform. Unfortunately I have stumbled into some issues.


 I have created an "applicant" object that has one to many relationship with the object "applications". ie an applicant can make multiple applications. I have also created an "events" object that has a one to many relationship with the object "applications" i.e an event can have multiple applications made too it.


However I have a data rule that says that the same applicant cannot apply for the same event more than once. What is the easiest way to implement this rule surly this can be done as a validation rule when saving the "application" object. Is there a better way? do i need to delve into apex.


thanks in advance

A new version of "Dupe Eliminator" v1.1, is now available on the AppExchange. This app is free! 

It can help you clean up all your duplicate records on standard and custom objects, allows you to specify search criteria by field, and gives you the ability to merge dupe records found. 

You can download the app and user guide here:

I have not tried this but it should work:

Create a field on the application object that requires a unique value then write a workflow which updates this field with fields from the applicant  and event objects  (say record id). It should then be impossible to save a duplicate event application.