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
NuravNurav 

Date field as unique

Is there a way by which I can make a date field as unique identifier for a record ?.

 

Devendra@SFDCDevendra@SFDC
Hi,

I dont think so, but you can write a apex trigger to avoid creating a duplicate record for same date value.

Thanks,
Devendra
@anilbathula@@anilbathula@
Hi Nurav,

You can make a Date field unique .but not in the direct way.
It like a simple work around.where you need to create a text field ,make it as unique and update this field with the date value through workflow .By using formula like TEXT(Ur_date__c).
This will restrict user from creating duplicate records.Make the workflow to fire every time when ever a record is created or edited.