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
mshelmanmshelman 

More Dynamic Apex issues

I am using a Schema.SObjectType.,<customobject>.fields.getMap() call which is intermittently returning null. It has been working fine in developer org for weeks but started failing after the apex class was added to a package. The package was deleted and the class started working again but is again failing after being added to a new package.

Mike
gjsgjs
There are a number of issues around dynamic covered by a number of bugs:
 
Bug #210020 covers:
 
1) PAC does not allow access to subscriber created custom field extensions. EG:

Namespaced(fRecruit) Dynamic code has access to fRecruit__Canidate__c sobject. But if the subscriber adds a field to the object, Dynamic code cannot operate on this custom field.

2) By default, namespaced code should have complete dynamic access on the namespaced objects/fields - regardless of whether PAC is enabled.
 
We plan to fix this in a Summer 08 patch.
Bug #215860 covers:
 
PAC must be enabled in order for dynamic apex to work, but if your package contains an scontrol, we don't allow you to set PAC on the package.
 
This bug is under consideration for Winter 09.
 
Bug #208274 covers:
 
Dynamic Apex Describe Intermittently Not Return Field Names.
 
This bug has been closed out as "Not reproducible". We'd love to get a repro case.