Notes
In Apex, the getSObjectType()
method is used to get the schema describing the object type of a record. This method is typically used with SObjects, which are a type of record that represents a row in a Salesforce object. The returned Schema.SObjectType
represents the metadata of the object type.
Here's an example of how you might use getSObjectType()
:
Account acc = new Account(Name='Test Account');
insert acc;
Schema.SObjectType objType = acc.getSObjectType();
System.debug('SObjectType of the record: ' + objType);
Output: SObjectType of the record: Account
Video
Video does not exists.