function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnjaneyluAnjaneylu 

what is schema.Sobjecttype

Hi,
What is Schema.sObjectType in this satatement ?
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();

I am unable to know exactly..
Thanks in Advance,
Anji
AnjaneyluAnjaneylu

Here Schema.getGlobalDescribe() Returns a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in your organization.
Then what is the necessity of Schema.SobjectType inside Map..
Krishnan MishraKrishnan Mishra
Hi anji,
Schema and SObject Type bith are classes here in apex.If we check out the syntax then it depicts something like Outer class.Inner class, Thus it is represents reference to inner class of SObjectType. It is very useful and can be used in getting Sobject's tokens or can be used to retrieve metadata for any object or fields. 
Schema.sObjectType t = Account.sObjectType;// Returns token for the account object
Schema.DescribeSObjectResult D = Account.sObjectType.getDescribe(); // returns metadata for Account object