You need to sign in to do that
Don't have an account?
Prevent duplicate using validation rule
Hi,
I need to restrict the use from entering duplicate records, for this need to validate two fields.
For example:
Object: Categories
Fields: category Name - Text
Type - Picklist
Here each type should have unique values only, but the category values can repeat in another type.
validation Rule:
F(AND(Name = VLOOKUP( $ObjectType.Category__c.Fields.Name , $ObjectType.Category__c.Fields.Name, Name ), NOT(Id=VLOOKUP
($ObjectType.Category__c.Fields.Id , $ObjectType.Category__c.Fields.Name, Name ))) && TEXT(Type__c ) = TEXT( Type__c ), true, false )
But this will not work properly. Any Idea?
I don't know if it can be done with a VR, but if you're on EE or UE you can create a custom field, define it as Unique (No Duplicate Values Allowed) and create a WFR that passes the values to your Unique Field.
The proposed data changes would violate a uniqueness constraint.