Thursday, April 10, 2014

What is an sObject in Apex?

What is an sObject in Apex?


An sObject is any object that can be stored in the Force.com platform database. These are not objects in the sense of instances of Apex classes; rather, they are representations of data that has or will be persisted

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.

This creates an invoice statement, which corresponds to the Invoice_Statement__c custom object, without setting any fields and assigns the new invoice statement to an sObject.

sObject s = new Invoice_Statement__c();


3 comments:

Unknown said...

Thanks - it is a good example

Pratik kumar said...

What is specfic object in apex language?

Unknown said...

thanks for explanations.we are unable to open apex,admin,interview questions.

Post a Comment

 
| ,