1

I have a custom object called Job and Job has a couple of Lookup fields linking with Group, Account, Contact, Custom Object. If I iterate through each object I get:

Too many fields describes: 101

What's the best way to get Job object structure (including all fields and fields belong to those Lookup objects)?

2
  • 4
    Are you doing this in Apex? Can you show us what you've tried? Oct 4, 2014 at 13:17
  • 1
    Update your metadata version. The describe limits have been completely lifted afaik.
    – Adrian Larson
    Dec 18, 2015 at 19:22

2 Answers 2

1

Describe Limits have been removed since Summer '14. So you just need apiVersion >= 28.0 in your -meta.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>28.0</apiVersion>
    <status>Active</status>
</ApexClass>
0

Depending on your code you could try to execute the following using the REST API.

Object describe: http://www.salesforce.com/us/developer/docs/api_rest/Content/resources_sobject_describe.htm

Then you can filter the content and do a field describe: http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_describe.htm

As the documentation suggests: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_field_tokens.htm#apex_describe_object_all_fields

You can only have 100fields member variable statements in an Apex class or trigger.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .