Custom Objects vs Custom Settings

Custom Objects:

Custom objects are custom database tables that allows you to store information unique to your organization. Fields of all data types such as picklist, checkbox, rich text field can be created. Can be reference to another object.

Create Custom Objects - Customize in setup -> Build -> Create -> Objects

Custom Settings:

Similar to custom objects, custom settings also store information, but these data is exposed application, which enables to access data without repeated queries.With custom settings, we can avoid using hard coded values and instead those values can be created as custom settings and easy to access whenever it is needed instead of changing in the code directly. No relationship field required.

Create Custom Settings - Customize in setup -> Build -> Develop -> Custom Settings

Types of Custom Settings:

1) List Custom Settings
2) Hierarchy Custom Settings.

If the Privacy for custom settings is selected as "Protected" then it is used in managed package and cannot be edited.

In our next article we look on how to use custom objects and custom settings in APEX, Visualforce etc. 

Comments

Popular Posts