I've created a function that determines if an object is real and (in this case) setting a variable to true/false based in that result. That value is then used to set a vf variable that will later be used to show or hide an html element: VF page section
VF Controller
this.showRecurring = Helper.isRealObjectName('npe03__Recurring_Donation__c');
Helper.isRealObjectName
public static Boolean isRealObjectName(String objName) < Boolean isReal = false; // Call global describe to get the map of string to token. Mapgd = Schema.getGlobalDescribe(); // Get the token for the sobject based on the type. Schema.SObjectType st = gd.get(objName); if(null != st) < isReal = true; >return isReal; >
This works fine in a development environment (showRecurring = true), however in a managed package it does not (showRecurring = false). npe03__Recurring_Donation__c exists in both places. If I run the isRealObjectName logic in the Developer Console on the server with the managed package, "isReal" = true; Is there anything in a managed package that would cause this behavior?