get sobject type salesforce

While coding generic components we may need to know the type of records(object name) that are stored in a particular list.
Salesforce provides method to find out the type of data that is being stored in a list. We have to use List method getSObjectType() for this.
String objectName = string.valueof(accList.getSObjectType());

Note that this method Only works on sObject data.


  1. Nowadays, most of the businesses rely on cloud based CRM tool to power their business process. They want to access the business from anywhere and anytime. In such scenarios, salesforce CRM will ensure massive advantage to the business owners. Salesforce Training | Salesforce Training in Chennai

  2. It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.

    java Training in Chennai

    Java Training in Bangalore