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

duplicate rule with vlookup validation rule
Hello, Salesforce Professionals
I need to create a validation rule that will prevent creating records with the same proprietary_number__c field on billing__c object.
I wrote this formula:
and(
proprietary_number__c = VLOOKUP
($ObjectType.billing__c.Fields.proprietary_number__c , $ObjectType.billing__c.Fields.Name , proprietary_number__c ),
not(
Id=VLOOKUP
($ObjectType.billing__c.Fields.Id , $ObjectType.billing__c.Fields.Name , proprietary_number__c )))
But it doesn't work. I still can create a record with a duplicate proprietary_number__c field.
Please, help me. I can't understand what I am missing in this formula.
Thank you in advance.
I need to create a validation rule that will prevent creating records with the same proprietary_number__c field on billing__c object.
I wrote this formula:
and(
proprietary_number__c = VLOOKUP
($ObjectType.billing__c.Fields.proprietary_number__c , $ObjectType.billing__c.Fields.Name , proprietary_number__c ),
not(
Id=VLOOKUP
($ObjectType.billing__c.Fields.Id , $ObjectType.billing__c.Fields.Name , proprietary_number__c )))
But it doesn't work. I still can create a record with a duplicate proprietary_number__c field.
Please, help me. I can't understand what I am missing in this formula.
Thank you in advance.
It can be done for custom objects.
Alternate options:
1. Change the field to an auto-number field.
2. Set the field proprietary_number__c as unique in the field properties
hth
regards
Andrew
Since the Proprietary number field is a part of the managed package. I can't make any changes to it.
I know I can create an error message with apex but prefer declarative methods.
Thank you anyway.
Maybe its a cloud version thing, but i see something like the following: