function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ckellieckellie 

Trying to understand governor Limits with fields.

I am trying to install am appexchange managed app that I can recieving errors from. I am running up against the governor limit:

 

Total number of describes allowed7 	100

7 Describes include the following methods and objects:

    * ChildRelationship objects
    * RecordTypeInfo objects
    * PicklistEntry objects
    * fields calls

 

All I know at this time is this has something to do with the number of fields I have on a given object. I have a number of questions about the above text.

 

1. What does "describes" mean?

2. Does objects mean field?

3. What are "fields calls?"

 

Thank you,

ckellie

 

Best Answer chosen by Admin (Salesforce Developers) 
kurtz_wolfgangkurtz_wolfgang

Based on my understanding, Describes mean any place in the code where you are referring the following objects:  Child Relationship, RecordTypeInfo and PicklistEntry.

 

RecordTypeInfo: A RecordTypeInfo object is returned from the sObject describe result using the getRecordTypeInfos method. 

Schema.DescribeSObjectResult R = Account.SObjectType.getDescribe();
List<Schema.RecordTypeInfo> RT = R.getRecordTypeInfos();

A Schema.PicklistEntry object is returned from the field describe result using the getPicklistValues method. For example:

 Schema.DescribeFieldResult F = Account.Industry.getDescribe();
List<Schema.PicklistEntry> P = F.getPicklistValues();

 

Field calls: Any code where you are referring the field of an object (probably calls getter/setter method). This is my guess.

 

Hope this answers your questions.

 

 

All Answers

kurtz_wolfgangkurtz_wolfgang

Based on my understanding, Describes mean any place in the code where you are referring the following objects:  Child Relationship, RecordTypeInfo and PicklistEntry.

 

RecordTypeInfo: A RecordTypeInfo object is returned from the sObject describe result using the getRecordTypeInfos method. 

Schema.DescribeSObjectResult R = Account.SObjectType.getDescribe();
List<Schema.RecordTypeInfo> RT = R.getRecordTypeInfos();

A Schema.PicklistEntry object is returned from the field describe result using the getPicklistValues method. For example:

 Schema.DescribeFieldResult F = Account.Industry.getDescribe();
List<Schema.PicklistEntry> P = F.getPicklistValues();

 

Field calls: Any code where you are referring the field of an object (probably calls getter/setter method). This is my guess.

 

Hope this answers your questions.

 

 

This was selected as the best answer
ckellieckellie

This is great. Thank you