Q & A with Matt K! Don’t Make this Mistake as a Salesforce Developer
Error: Method does not exist or incorrect signature: void getGlobalDescribe() from the type Schema
We’re kicking off the new year with a new series: “Q & A with Matt K!”.
Matt sits down weekly to tackle Salesforce questions from the community — unrehearsed and unedited to demonstrate what it looks like when we encounter, evaluate, troubleshoot, and resolve real-world issues and use-cases.
This time, Matt’s taking a look at an Apex error message that a lot of new Salesforce devs may encounter:
Method does not exist or incorrect signature: void getGlobalDescribe() from the type Schema
You may have a different function than “getGlobalDescribe()” and a different type than “Schema”, but this is a common error, that’s tricky to troubleshoot, if you’re new to the platform because it involves some reserved-but-not-reserved keywords for classes because they exist as objects in Salesforce.
For the restricted Apex keywords, take a look here: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_reserved_words.htm
And for the unrestricted-but-restricted keywords, this is a good jumping off point: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm
Hopefully this’ll help some new SF developers avoid this headscratcher before it turns into a hair-puller!
And if you’ve got a question you’d like Matt to answer, leave it in the comments here so we can add it to a future video!
Until next time, keep working hard, smart, and happy. And we’ll see you in the cloud!