I was trying to use custom metadata type in validation rule. My use case is i want a restriction on digits in phone number on various objects in managed package.I want to give flexibility to subscribers so that they can edit min and max length of phone. I created custom metadata type records and i want to access them in validation rule ..

can anyone suggest me How can i achieve this ?


Custom metadata types are not yet available for Validation Rules. You still need to use Hierarchical Custom Settings if you want to have some configuration value affect a VR.


As of Spring '18 you can use Custom metadata types in Validation rules. Its available from 11th Feb 2018 in all Orgs and is already available in a few sandboxes to try out.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.