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

Validation of a custom object


I am a new to and I face a problem.

I have created 1 custom object Reservation with fields field1 and field2.

I want to add a validation rule that will check (at new object creation time) that another Reservation object does not already exist reservation with fields1that has the same vale as the object being created.


I have look at all the formula possibility and I don't see how to make a "find"  request on the existing objec.


Any idea


Thanks in advance for your help


There are instructions on how to prevent duplicate records from being created based on one or more fields in the cookbook.  You can download it here for free:


Pg. 161


Well, in fact i want something more sophisticated than preventing duplicate record.


it is something like this :


NewObject can be save is :

  number of record where (

field1>NewObject.field1 && field1<NewObject.field2 && field2<NewObject.field2 && field2>NewObject.field1) == 0