+ Start a Discussion
Vishal RanjanVishal Ranjan 

readMetadata Limitation

Hello Everyone,
I have a requirement in which i have to read approx 1500 list views. Please guide me to acheive this.
Problem is I can read only 10 list view in one call out and maximum call out allowed in one execution is 100. so maximum number of list view i can read in one execution is 1000. so need help to overcome this limit,

Thanks in advance !
Alain CabonAlain Cabon
For overcoming the limit calling readMetadata directly in Apex, there is always the retrieve option (downloading all the data in an XML file) but the list of fields will be limited.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieve_request.htm 
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieveresult.htm

A sample in JAVA: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieve.htm

You need a package.xml Manifest File:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm

List Views for Standard Objects
The easiest way to retrieve list views for a standard object is to retrieve the object. The list views are included in the retrieved component. 

Alain
Vishal RanjanVishal Ranjan
Thanks for your reply Alain.
I overcome this limit by using batch job.