May 2019
Intermediate to advanced
546 pages
12h 41m
English
This method is used to retrieve the information of every single object that is available in your org. This method returns a map with the (API) name of your object as the index and an object token as the value. This token is an instance of the Schema.SobjectType class.
If you copy and paste the following code in your developer console and execute this code, you will retrieve the map with all the objects:
Map<String, Schema.SObjectType> mapObjects = Schema.getGlobalDescribe();System.debug(mapObjects);{acceptedeventrelation=AcceptedEventRelation, account=Account, accountchangeevent=AccountChangeEvent, accountcleaninfo=AccountCleanInfo, accountcontactrole=AccountContactRole, accountcontactrolechangeevent=AccountContactRoleChangeEvent, ...Read now
Unlock full access