+ Start a Discussion
shankar anandshankar anand 

Compilation Error Schema.getGlobalDescribe();

I'm trying to use the following in my controller class in the developer edition. It throws a compilation error saying "Method doesn't exist or incorrect signature"

Map<String, Schema.SObjectType> globalObjMap = Schema.getGlobalDescribe();

I've seen the descibe call being used in many examples on the web and even in the salesforce documentation. How come it's throwing an error for me. Kindly help.
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for code example. I hope that will help you
http://amitsalesforce.blogspot.com/2015/11/apex-describe-dynamic-retrieval-of.html

public Map <String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();

 
shankar anandshankar anand
Hi Amit, thanks for replying. The compilation error is for the foellowing line only. Is this some version issue? Is getGobalDescribe() a deprecated method? I'm working in API v35.0.

Map<String, Schema.SObjectType> globalObjMap = Schema.getGlobalDescribe();
Nisar799Nisar799
Hi shankar anand,
API v35.0 won't be a reason for the issue you are facing. There may be some other reason.