Course Content
YouTube video
About Lesson

When we talk about the data model, we’re talking about the collection of objects and fields in an app. Let’s learn more about objects and fields so you can start building your own data model

Object Manager in Salesforce

Type of objects in Salesforce

Salesforce supports several different types of objects. There are standard objects, custom objects, external objects, platform events, and BigObjects.

  • Standard object: Predefined object available in Salesforce.
  • Custom object: Created by system admins.
  • External objects
  • Platform events
  • BigObjects

When to Create Custom Object

  • When we find that, the data we want to store does not fit in any standard object available in our org.

Relationship Between Objects In Salesforce

  • To link objects with each other we can create relationship between object.
  • It become easy to see data and reports when we have good relationship between object.
  • eg, Contact- Case
  • Normally we call this relationship as Parent -Child.

Type of Relationship

  • Master Detail Relationship:
    • Tightly coupled, have direct dependency on other object.
    • Parent object known as master and Child known as detail.
    • Standard object can not be on detail side.
    • If a object already has some data , MDR can not be created on it.
    • If we delete master record , detail record will also be deleted.
    • Owner field is not available for detail side object. Owner of master object will be treated as owner.
    • We can have 2 MDR fields on a object.
    • Advantage of roll up summary fields
  • Lookup Relationship
    • It is loosely coupled and does not have a direct dependency on another object.
    • Deletion of the parent record, does not delete the child record by default.
    • Custom and standard objects both can be on the child’s side.
    • No advantage of Roll-up summary fields.
    • We can have up to 40 lookup fields. If 2 MDR are not created else 38.
  • Many to Many (junction)
Many to Many (junction object in Salesforce)

Fields

Fields are attributes for object. Every object has some predefined fields, which are known as standard fields. eg. Name (Text or Auto number), Created date, Lastmodifieddate, Owner, CreatedBy, LastmodifiedBy, ID (Unique). System admin can create fields on standard and custom objects as per the requirement. These fields are known as custom fields.

  • Auto Number: 
    • Automatically assign unique number to each record.
    • If we delete any record, number will not be reset.
  • Checkbox:
    • When we want to store true/false value.
    • Data import wizard and Data export tool use 1 or 0. 1 represent true and 0 represent false.
  • Currency:
    • To store currency type of value. ie. Price 
    • Support decimal values also.
  • Date
    • To store date values . ie. start date, end date.
    • Calendar popup is shown on the detail page when user want to put value.
  • Date/Time
    • To store date and time both in single field
  • Time:
    • To store time type of data. eg. start time ,end time
  • Email:
    • To store email type value.
    • Max character limit is 80.
  • Formula
    • Calculated at run time.
    • Available as read-only.
    • Can access the parent record fields.
    • Child record fields can not be accessed.
  • Number:
    • To store numeric values
    • Decimal is allowed
    • max length is 18 digit
  • Percent
    • To store % type values. eg. Discount
    • % appended automatically
  • Phone
    • Allow user to put phone number
    • Max character limit is 40.
  • Picklist/Multi select (picklist):
    • Allow user to select value from pre-defined list.
    • For multiselect picklist selected values are displayed as ; separated.
  • Rollup Summary:
    • Min,Max, Avg, Count, Sum
    • Work with Master Detail Relationship
  • Text
    • Text
    • Text Area
    • Text Area Long
    • Rich Text Area
    • Encrypted text 
  • URL
    • Store web urls
    • 255 character
Join the conversation
Bookmark
0% Complete