Skip to main content
Hi Experts,

I want to get the metadata result of workflow rule and Validation Rule through tooling api.

but salesforce have a limit "Query this field only if the query result contains 

no more than one record. Otherwise, an error is returned. If more than one record exists, 

use multiple queries to retrieve the records. This limit protects performance."

this query working fine:

/services/data/v41.0/tooling/query/?q=Select+Name,MetaData,TableEnumOrId+From+WorkflowRule+LIMIT+1

but I want more than record like the below query and this not work : 

/services/data/v41.0/tooling/query/?q=Select+Name,MetaData,TableEnumOrId+From+WorkflowRule

is there another alternate solution to overcome of such type of situation.

Thanks 

Mukesh Kumar
1 answer
  1. Nov 17, 2017, 2:51 PM
    Cannot retrieve more than one record with Metadata or FullName fields in the query

    This is the know issue https://success.salesforce.com/issues_view?id=a1p300000008YgSAAU

    Please check below post for workaround

    1) https://success.salesforce.com/issues_view?id=a1p300000008YgSAAU

    NOTE:- If you will remove metadata then your query will work

    /services/data/v41.0/tooling/query/?q=Select+Name,TableEnumOrId+From+WorkflowRule

    I hope this will help you

     
0/9000