+ Start a Discussion
Avinash AAvinash A 

Not able to execute query

select id,ValidationName,Active from Validationrule

I am not able to execute this query ..

I am getting "Invalid type: ValidationRule"
I am able to execute this query in query editor with tooling api enabled.
 
sfdcMonkey.comsfdcMonkey.com
Tooling API facilitates the development of any organization-based user interface or user experience that requires create, read, update, or delete operations to Salesforce metadata. By contrast, Metadata API facilitates the migration of Salesforce metadata from one organization to another

What Does Tooling API Do?
 1) Manage working copies of Apex classes and triggers and Visualforce pages and components.
 2) Check for updates and errors in working copies of Apex classes and triggers and Visualforce pages and components and commit changes to your organization.
 3) Set heap dump markers.
 4) Overlay Apex code or SOQL statements on an Apex execution and view detailed debug log and heap dump information.
 5) Set trace flags and generate log files for yourself or for other users.
 6) Access debug log and heap dump files.
 7) Manage custom fields on custom objects.

Please check below post for more detail on tooling API.
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_tasks.htm

so run this below query  with Tooling API enabled
select id,ValidationName,Active from Validationrule

I hope this will help you. Please let us know if this will help you.
 
Vishal MarneVishal Marne
Hi Avinash
Please see below url for your reference.
1.https://developer.salesforce.com/forums/?id=906F00000005KekIAE
2.https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_validationrule.htm