Skip to main content
Olga Kim (Olga Kim) ha fatto una domanda in #Formulas
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.

 
3 risposte
  1. 10 set 2020, 04:02
    why not just use duplication rules as in the Setup > Data > Duplicate Management.  

    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

    why not just use duplication rules as in the Setup > Data > Duplicate Management. It can be done for custom objects.Alternate options:1. Change the field to an auto-number field.2.

    hth 

    regards

    Andrew

     
0/9000