• #66921
    Salesforce | Aditya Aditya #15
    Forcetalks

    What is generic sObject means in Salesforce?

    What is generic sObject means?

    • This topic was modified 5 days, 4 hours ago by Salesforce | Aditya Aditya.
    #66924
     Marziya #11
    Forcetalks

    In SFDC, SObject is generic and Account, Opportunity, CustomObject__c are its concrete type. Generic sObject abstracts the actual representation of any objectassigned to it. sObject is the name of the generic abstract type that can be used to represent any persisted object type.

    #66928
    Salesforce | Arun Arun Pal #12
    Forcetalks

    sObject is a generic data type. Every record in Salesforce is natively represented as an sObject in Apex. Any object you store in salesforce organization can be sObject. In a simple language, It is a big object in which you can store any object.

     

    #67044
    Salesforce | Aditya Aditya #15
    Forcetalks

    sObject is a generic abstract type that corresponds to any persisted object type. The generic sObject can be cast into a specific sObject type, such as an account or the Invoice_Statement__c custom object.

    #67066
    Salesforce | Kirandeep Kirandeep #24
    Forcetalks

    Hi ,

    Generic sObject means, it can be of any persisted SFDC objects type.
    For ex: Phone is generic type and Samsung,Nokia all are concrete types of Phone.

    In SFDC, sObject is generic and Account, Opportunity, CustomObject__c are its concrete type.
    Generic sObject abstracts the actual representation of any object assigned to it.

    For example :-

    List<SObject> GenericList = new List<SObject>();
    SObject acc = [Select Id, Name from Account limit 1];
    GenericList.add(acc);

    SObject con = [Select Id, Name from Contact limit 1];
    GenericList.add(con);

    system.debug(GenericList);

    #67075
    Salesforce | MOHIT MOHIT #20
    Forcetalks

    Every record in Salesforce is natively represented as an sObject in Apex.

    Each Salesforce record is represented as an sObject before it is inserted into Salesforce. Likewise, when persisted records are retrieved from Salesforce, they’re stored in an sObject variable.

    Standard and custom object records in Salesforce map to their sObject types in Apex. Here are some common sObject type names in Apex used for standard objects.

    Account
    Contact
    Lead
    Opportunity
    If you’ve added custom objects in your organization, use the API names of the custom objects in Apex.

Viewing 6 posts - 1 through 6 (of 6 total)

Please to reply to this topic.

Popular Salesforce Blogs

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?