You need to sign in to do that
Don't have an account?

Is it possible to validate an object to has just one record in a day?
Hi everyone,
I want to know if it is possible that an object can only have a record created by day depending on some criteria
Example:
Object: "OD__c" Custome Field: Date__c, Suc__c.
this Object has already a record created today called
Name: OD-001 02/Feb/2016 Suc: Central
so if I try to create another one with the same values I would like to get an error
Name: OD-002 02/Feb/2016 Suc: Central
can this object be validated if it meet the criteria
If (Date__c==Today() && Suc__c == "Central")
I want to know if it is possible that an object can only have a record created by day depending on some criteria
Example:
Object: "OD__c" Custome Field: Date__c, Suc__c.
this Object has already a record created today called
Name: OD-001 02/Feb/2016 Suc: Central
so if I try to create another one with the same values I would like to get an error
Name: OD-002 02/Feb/2016 Suc: Central
can this object be validated if it meet the criteria
If (Date__c==Today() && Suc__c == "Central")
You can use following approach :
Explaining using Opportunity object:
1. Create external ID text field on opportunity object and mark it as unique.
2. Create WF on Oppty to update this field with Date-Month every time record is created.
If record is created second date with same external ID field, then it will result in error as external ID is not unique and create operation will roll back.
Hope this helps.