What are in objects Salesforce?

287    Asked by AditiIshii in Salesforce , Asked on Sep 22, 2022

I am very new to the Apex programming first. And I know about Standard & Custom objects. And also the custom objects have an extension of '__c'. I observed in the programming a lot of references about the object but I am not getting the concept of it clearly.


As per definitions I understood it as: object is a generic abstract type that corresponds to any persisted object type. The generic object can be cast into a specific object type, such as an account or the 

Invoice_Statement__c custom object (Standard or Custom object type).


Can someone please help me to understand more about object. - When, where & How it needs to be used?

Answered by Aditya Yadav

An Object in Salesforce represents a specific table in the database that you can discreetly query. The API Name is what you reference as ending in __c. Standard Objects have names like Account or Opportunity, whereas Custom Objects and Custom Settings have names like My Object__c or My Setting__c. Custom Settings are special objects you can get without a query. You can store any specific record in a generic Object property. If you do so, you lose the ability to get/set most fields by name, but can get them generically.

Object  generic Account = new Account();

generic Account.put ('Name', 'value');

Account specific Account = new Account();

specific Account.Name'value';



Your Answer

Interviews

Parent Categories