Activity Forums Salesforce® Discussions Can you query Validation Rules in salesforce ?

  • Kirandeep

    Member
    May 14, 2020 at 12:38 PM

    Hi Ayush ,
    yes we can query Validation Rules with Object names .Something like this :-
    SELECT Id, ValidationName, Active, Description, EntityDefinition.DeveloperName, ErrorDisplayField, ErrorMessage FROM ValidationRule.

  • [adinserter block='9']
  • Anuj

    Member
    May 14, 2020 at 1:07 PM

    Validation Rules are metadata, so are not query-able using Apex / SOQL. You canuse the Metadata API to query for the ValidationRule element

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…