Generic sObject
Instead of referencing a specific Object Type, like Account or Contact, to then instantiate an in-memory container, you can reference a generic Object Type.
Instead of Account acct = new Account(Name='Salesforce Consulting Company'); We can use generic sObject by replacing “Account” type with simply “sObject”
sObject acct = new Account(Name=‘Salesforce Consulting Company’);
The use of generic sObject allows you to flexibly reference any Salesforce record, across standard vs. custom objects. This is different from fixing the sObject Type to specifically, for example, Account vs. Contact. If we set Account as the sObject type then we can only reference fieldnames that actually exist in the Account Object.







