Activity Forums Salesforce® Discussions How to convert sObject to account in Salesforce?

  • Anjali

    Member
    February 3, 2021 at 1:47 pm

    You can assign particular type object to generic for e.g
    sObject s = new Account();
    But You can't assign Generic type Object to Particular(Account) Object For e.g
    Account a =s; This will give error so you need to type Cast this to
    Account a=(Account)s;

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos