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
gsmithfarmergsmithfarmer 

describeSObjects() returns "phantom" fields when fetching multiple SObjects at a time.

I have a short java program (using WSC) that fetches DescribeSObjectResult for all SObjects in an instance. The results returned for certain SObjects have a different # of fields returned when objects are fetched 1 at a time and 100 at a time.  The extra fields returned when fetching 100 at a time do not actually exist.  The little java program is only 100 lines. It's output shows the problem (the # of fields differs by 2 sometimes; the same phantom fields are always the same).

Initialize: describeGlobal() -- read the names of all SObjects
Phase 2A: Read SObject descriptors one at a time (this will take a while).
Phase 2B: Read SObject descriptors 100 at a time (this will take less time).
Phase 3: Look for SObject descriptors that differ.
ERROR: SCMC__Customer_Address__c has 42 fields not buffered and 44 when buffered.
     : The buffered descriptor has the following extra fields:
     : LastReferencedDate
     : LastViewedDate
ERROR: SCMC__Unit_of_Measure__c has 14 fields not buffered and 16 when buffered.
     : The buffered descriptor has the following extra fields:
     : LastReferencedDate
     : LastViewedDate
ERROR: SCMC__Warehouse__c has 24 fields not buffered and 26 when buffered.
     : The buffered descriptor has the following extra fields:
     : LastReferencedDate
     : LastViewedDate
ERROR: SCMQT__Option__c has 22 fields not buffered and 24 when buffered.
     : The buffered descriptor has the following extra fields:
     : LastReferencedDate
     : LastViewedDate

I am happy to provide the little java program to SFDC tech -- once I know who to send it to.   Note: the problem DOES not occur on every instance. The last time I saw it was around 10 months ago (and I see a lot of instances at the CTO of Capstorm).