0

I want to retrieve the metadata using ANT, have an XML file of size 2MB and total line are around 35000. When i run the command to retrieve the metadata I am facing error as max limit is 10000 files. here what is mean by files, is it the no. of lines in XML? in that case I need to prepare the 4 XML files and retrieve it in 4 steps. But this limit is there for deployment also how can I deploy the complete data at a time since we can not deploy parts wise since there might be chance of dependency of mata data. How to approach in this case to retrieve and deploy the meta data at a time.

Thanks, Amit

0

According to the Metadata API documentation (API limits), here are the limits:


You can deploy or retrieve up to 10,000 files at once. AppExchange packages use different limits. In API version 43.0 and 44.0, AppExchange packages can contain up to 12,500 files. In API version 45.0, AppExchange packages can contain up to 17,500 files. In API version 46.0 and later, AppExchange packages can contain up to 22,000 files. The maximum size of the deployed or retrieved .zip file is 39 MB. If the files are uncompressed in an unzipped folder, the size limit is 400 MB.


So, you cannot retrieve 35K components in one shot. You have to break it up into 4 groups. That said, there are some tricks that you can employ. For example, do not retrieve Custom Fields as separate items. Get the whole Object and all the fields will come as part of it.

To be correct, it is not the number of lines in your package.XML file. It is the number of member tags that you have. That does not reduce it by much but any small reductions to get you under the limit is worth it.

Another tip: look for packages or managed classes/ pages being downloaded. Managed Packages (AppExchange products) tend to be huge and there might be items that you can drop from your file that have drastic reductions in items retrieved even if it is a single line in your file. Managed Classes and Pages are useless in your retrieval anyway as they are obfuscated (unless downloaded in the Org that developed them). So, another item to drop.

So, bottom line: No easy way to reduce but limits are limits and you are forced to work with them. Drop me a note if you want to discuss more.

Sridhar

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.