Skip to main content

In Use Custom Metadata Types in Formulas, Default Values, and Validation (salesforce.com), I create a validation rule Revenue_Validation with Error Condition Formula like 

IF(

(ISPICKVAL( Support_Tier__c , "Gold")

&&

( AnnualRevenue >

($CustomMetadata.Support_Tier__mdt.Gold.Minimum_Spending__c * 20)

)

), TRUE, FALSE

)

But as a result, I get the message: In the validation rule named 'Revenue_Validation', we can’t find a reference to '$CustomMetadata.Support_Tier__mdt.Gold.Minimum_Spending__c'.  Where did I get it wrong?

6 Antworten
  1. 14. Juli 2022, 08:30

      @Serghii Kostyhin  Try with this formula let me know if faces same issue    AND(ISPICKVAL( Support_Tier__c , "Gold") ,

     

    AnnualRevenue < (20*$CustomMetadata.Support_Tier__mdt.Gold.Minimum_Spending__c)

     

0/9000