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
apexsutherlandapexsutherland 

Detecting sObject deploymentStatus in Apex code

Custom sObjects have the option of remaining "In Development" for Administrator access only. This is nice for cautious, good little sysadmins who are mucking around in their production environment making custom objects that they're not ready to share with their end users yet, but it's a royal PITA for AppExchange developers because most admins are oblivious to the fact that if they only make the package available to System Administrators on install, then the objects are not deployed (and remember, they won't get the prompt to deploy the objects if the install takes too long and they get sent to the "Processing" page), and stuff starts blowing up when they try to subsequently enable the app for their end users.

 

I need a way to blare a big warning at System Adminstrators in our custom admin interface that the app won't work if the objects are not deployed. However, I can't figure out any way to do that in Apex code. When I run an sObjectType.getDescribe() on an object that is "In Development" vs. one that is "Deployed", there isn't any discernable difference to a SysAdmin. How else can I dynamically notify them that there are objects in my application package that haven't been deployed yet?