Skip to main content

Objects in Force.com

Hi Folks, Today I am writing about Objects in Force.com. In previous article we have discussed about various components of force.com applications with an overview of  the Salesforce data model so diving deep into it we are going to discuss objects in force.com.

Basically, there are two types of objects in force.com. Table below is showing some main objects as example -


Standard Objects
Custom Objects




MyCustomObject__c
Account
Contact
Lead
Opportunity
Campaign
Case
Quote

Note:- All Standard Objects are not mentioned.


As we all know that Objects in Salesforce are the database tables and Standard Objects are predefined by Salesforce and those objects which are defined by us, are Custom Objects. So in the above table MyCustomObject__C is a custom object with a sample name. “__c” is a suffix, added by Salesforce to differentiate between Standard objects and Custom objects.

Standard objects are predefined by Salesforce with some standard fields in it to store basic/initial information like name etc. and we can also create various fields of some specific data types like text, number, checkbox etc. and Fields created by us are known as Custom Fields. A custom field also named with a suffix “__c” at the end of the name of the field. For example if we want to create a field to hold data for “Description” so we can give it a name Description and what Salesforce will make it is “Description__c” and the name with suffix is API name for that field and without suffix is the label of that field. So that’s that about the custom fields.

Custom objects are defined by us and when we define a custom object Salesforce puts some standard fields in it like Id, Name, LastModifiedDate etc. and about these we will discuss later in specific articles. It’s obvious that we can define fields in a custom object too. Names for all custom fields will be with “__c” suffix at the end of the name as we discussed above. In developer edition org, we can define up to 500 custom objects. We can use a custom object as well as the standard objects.

May objects are related with some other objects in a data model as well as in Salesforce data model, according to requirements. Objects are related with other objects through Relationships in force.com. A Relationship defines a child-parent relation between objects.

Basically, there are two types of relationships “Master-Detail” and “Lookup” .

Objects have a feature called Rollup Summary by using this we can summarized Children’s data based on some criteria at Parent object record by creating a Rollup Summary Field. Rollup Summary Field is only allowed in Master-Detail relationship model. We will discuss it later.

We can also define buttons and actions on an object to perform some process on records available in it. For example we can define an action to insert some sample data in an object by clicking a button called “ Create Sample”. As in other databases, We can also make Queries and DML operations on an object in force.com. Both SOQL and SOSL are used to query and search data from the database. We’ll learn more about these in other articles.

Salesforce has some magic defined that a custom object can also work as a standard object. Like in both types of object we can define Validation Rules to validate the data in fields are valid or not. And we can define Triggers as well to automate the processes on the records of its associated object. Both types of objects have Standard Controller in built. We will discuss those features in detail in other articles because here I want to keep it simple for now.

So this is the basic information that a beginner must know before getting deep into force.com, about objects and of course there are many more things to know about objects  and those things will be known as we go further. I hope this article will help you to know somethings about objects.


Stay Tuned to Salesforce Nation… 


Comments

Popular posts from this blog

Force.com Applications

Hi Folks, Today I’m writing about the Force.com Applications for Salesforce.com. Developing an application on force.com has a defined process. This process goes as -  We can develop our application in Developer Edition Org. After being developed an application must be tested in a Sandbox. Since it’s a tested application it must be submitted for the Security Scanner reviews. Scanner scans our application for security, complexity and other issues. If our application gets a “No issues found” result then only it can be pushed on App Exchange. App Exchange is a marketplace for force.com applications. App Exchange is just like Google App Store. From the App Exchange we can download and install applications directly into our Salesforce.com CRM org. An application is a collection of different Kinds of Components as we see after logging into CRM. Components available in an application have a big picture behind it’s view and behavior so before understanding these compone...

MVC Architecture

Hi Folks, Today I’m writing about MVC the MODEL, VIEW, CONTROLLER in Force.com application development platform. MVC is basically an Architecture Pattern which has some separation of concerns, in a Software. Separation of Concerns means that classifying a Module in Sub-Modules which are integrated and interactive to each other. Components A Model basically manages data and enforces rules and validations on the data, currently in context. It’s a central component of the design pattern. A View is your HTML/Javascript based representation of your data pulled from your Model. It can be a chart or some tabular formatted page to view information. A Controller is a conveying medium between model and view which helps view to show data by pulling it from model. It basically accepts inputs and converts into instructions or commands to model or view. Working A model stores the data retrieved by the controller and displayed in the view. A view generates new ou...

Force.com (Development Platform)

Hi Folks, Today I’m writing about Force.com. Previously, we have discussed about how to start with Salesforce.com and Force.com and what type of solutions/products provided by Salesforce through Salesforce.com CRM. So that is all a basic stuff. Now let’s move ahead with some Customization and Configuration with development Features of Force.com. Force.com is a Application development platform which enables you (as a developer or administrator) to Customize and Configure existing applications according to the workflow of your business and if it still doesn’t fit in, you can develop your own applications. To get into the force.com – you can just click on the setup link on the screen of your developer account, as we discussed previously. So if you look at the sidebar available there you can Customize/Configure and Develop the applications and components of your applications. Force.com provides two ways to implement your own business logics in any application. 1. Decl...