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());

Example:
Note that this method Only works on sObject data.

13 comments:

  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

    ReplyDelete
  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



    ReplyDelete
  3. I am really enjoying reading your well written articles.
    It looks like you spend a lot of effort and time on your blog.
    I have bookmarked it and I am looking forward to reading new articles.Keep up the good work..
    PHP Training in Chennai
    DOT NET Training in Chennai
    Big Data Training in Chennai
    Hadoop Training in Chennai
    Android Training in Chennai
    Selenium Training in Chennai
    Digital Marketing Course in Chennai
    JAVA Training in Chennai
    Java training institute in chennai

    ReplyDelete
  4. I have gone through your blog, it was very much useful for me and because of your blog, and also I gained many unknown information, the way you have clearly explained is really fantastic. Kindly post more like this, Thank You.
    Aviation Academy in Chennai
    Aviation Courses in Chennai
    best aviation academy in chennai
    aviation institute in chennai

    ReplyDelete