• Sir Rodney MacKenzie
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi All,

I have a requirement to retrieve metadata of all workflows, validation rules and flows using Tooling API. There is a limitation with Tooling API that we can not query metadata field when query returns more than one record. Mentioned in Force.com Tooling api doc-"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."
Because of this limitation I have to make callout for each workflows(validation or flows) one by one present in an org. So, if there are 1000 workflows then I will have to make 1000 callouts to retrieve metadata. This sometimes hits our org's API request limit and also increases processing time.

Is there any way to get metadata of multiple workflow rules in single callout.
Please suggest me. 

Thanks,
Shweta