2

We have more than 300 custom fields in several objects. When we retrieve them using Metadata API it throws exception of "Wenservice callout failed: String limit exceeded 100000" so we are thinking of using wildcard to retrieve custom fields in parts.

I tried retrieving by using wildcard like Acc* , A* etc. but it doesn't work. Only single character * worked for me. Can we use wildcards in any other way. Is there any documentation?

Also, can we provide query option in Metadata API request by which can return first 100 fields then next 100?

  • Can you split the request into 2: first query the object (As to get the list of fields), then split the field list into x lists and to a fetch fields for each of the sets. Or is the error on the object request already? (maybe include a code snippet?) – Guy Clairbois Nov 27 '14 at 14:49
1

This is a weird error which I am pretty sure is a salesforce issue. Have you filed a bug report yet? I have asked for more than 700 fields each for over 5 objects and more without any such issue. File the report and tell them to take a look at it.

About the wildcards, it is just a * or full name. No A* or Acc* options available at this time.

If you need to get first 100 fields and such, I would suggest combining data API to get list of fields and then metadata API with CustomField entries in the package.xml. That said, I think it is not worth the effort to do all this. Metadata API is very comfortable with fetching the max number of fields (~800) for each objects. The issue that you saw was just a temporary bug. File a Case and continue using just the metadata API only.

Just my two cents.

Sridhar

| improve this answer | |
  • Thanks for the response, can you please explain a little bit about "data api" you are referencing in your answer? – Ashwani Nov 29 '14 at 8:35
  • Data API is simply the webservices API. I think you would want to use the describeSObject() from salesforce.com/us/developer/docs/api/index.htm – Sridhar Nov 30 '14 at 21:38

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.