You need to sign in to do that
Don't have an account?
Pranavaditya Kannojoo
Schema.getGlobalDescribe unexpected behavior in managed package
I have code similar to below
if(Schema.getGlobalDescribe().get('ChatterMessage') == null){
chatterMessageEnabled = false;
} else {
chatterMessasgeEnabled = true;
}
In one of the environment we have disabled Private Messaging so that this standard object is not accessible. When I execute above code snippet in developer console, I notice that the chatterMessageEnabled is set to false which is expected.
However if this similar code is installed as part of managed package in the same environment, notice that chatterMessageEnabled is set to true which is unexpected and causing issues. Can any one help in overcoming this issue?
Searching on Schema.getGlobalDescribe results that its behavior in managed package is always trickier.
if(Schema.getGlobalDescribe().get('ChatterMessage') == null){
chatterMessageEnabled = false;
} else {
chatterMessasgeEnabled = true;
}
In one of the environment we have disabled Private Messaging so that this standard object is not accessible. When I execute above code snippet in developer console, I notice that the chatterMessageEnabled is set to false which is expected.
However if this similar code is installed as part of managed package in the same environment, notice that chatterMessageEnabled is set to true which is unexpected and causing issues. Can any one help in overcoming this issue?
Searching on Schema.getGlobalDescribe results that its behavior in managed package is always trickier.
Take a look at this issue:
https://success.salesforce.com/issues_view?id=a1p30000000T3iVAAS
Its not exactly the same thing, but it could be similar.
In which API version is this bug resolved?