Activity Forums Salesforce® Discussions How can we Differentiate Account ids,contactids from a list of sobject id in Salesforce?

  • sushant

    Member
    January 13, 2017 at 2:45 pm

    Hi Vikas,

    You can use Schema class for this.

    Schema.SObjectType sobjectType = myId.getSObjectType();
    String sobjectName = sobjectType.getDescribe().getName();

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos