You need to sign in to do that
Don't have an account?
RoyGilad
Schema.getGlobalDescribe in managed package
Managed package question!
I have a simple code that works outside the managed package (MP), but when I put it inside the MP it just gives me the objects within the package, and not all of the org's objects:
I have a simple code that works outside the managed package (MP), but when I put it inside the MP it just gives me the objects within the package, and not all of the org's objects:
Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); Map<string, string> sObjectNameToLabel = new Map<string, string> (); for(Schema.SObjectType d : schemaMap.values()) { Schema.DescribeSObjectResult ds = d.getDescribe(); sObjectNameToLabel.put(ds.getName(),ds.getLabel()); }Any ideas?
Did u managed to solve it?
May I ask you whether you found a solution or at least explanation to this issue?
We are having exatcly the same problem in our DEV org, where we develop a managed package. This org is pretty old (about 6-7 years).
Also we have a new DEV org created a couple of months ago and we also created another managed package there. What is interesting is that I don't see the issue in this org. The Schema.getGlobalDescribe() method returns all objects.
This makes me think that the issue may be related to system bugs in old SF instances.
We were able to resolve the problem along with Salesforce support. What they did for us was that they temporarily enabled this deprecated setting, it appeared in SF UI again, we changed it to "Unrestricted" and then they disabled it again. So, we were lucky, since we have an account with Parner Support.