Salesforce/Admin

[Admin Beginner]Data Modeling

송테이토 2023. 1. 1. 16:05

1. Understand Custom & Standard Objects

fter completing this unit, you’ll be able to:

  • Describe the perks of using objects on the Salesforce platform.
  • Explain the difference between standard objects and custom objects.
  • List the types of custom fields an object can have.

In Salesforce, we think about database tables as objects , we think about columns as fields , and rows as records .

Get to Know Objects

Salesforce supports several different types of objects. There are standard objects, custom objects, external objects, platform events, and BigObjects. In this module, we focus on the two most common types of objects: standard and custom.

Standard objects are objects that are included with Salesforce. Common business objects like Account, Contact, Lead, and Opportunity are all standard objects.

Custom objects are objects that you create to store information that’s specific to your company or industry. For DreamHouse, D’Angelo wants to build a custom Property object that stores information about the homes his company is selling.

Objects are containers for your information, but they also give you special functionality. For example, when you create a custom object, the platform automatically builds things like the page layout for the user interface.

Get to Know Fields

Field Type What is it? Can I get an example?

Identity A 15-character, case-sensitive field that’s automatically generated for every record. You can find a record’s ID in its URL. An account ID looks like 0015000000Gv7qJ.
System Read-only fields that provide information about a record from the system, like when the record was created or when it was last changed. CreatedDate, LastModifiedById, and LastModifiedDate.
Name All records need names so you can distinguish between them. You can use text names or auto-numbered names that automatically increment every time you create a record. A contact’s name can be Julie Bean. A support case’s name can be CA-1024.
Custom Fields you create on standard or custom objects are called custom fields. You can create a custom field on the Contact object to store your contacts’ birthdays.

과제

Build a custom Offer object

When a homebuyer makes an offer to buy a property, the brokers at DreamHouse Realty need to track the details in Salesforce. Create a custom object they can use to record the offer amount and target close date for the sale. Use auto numbering to generate the name of each offer record.

  • Create a custom object
    • Label: Offer
    • Object Name: Offer
    • Record Name: Offer Name
    • Data Type: Auto Number
    • Display Format: OF-{0000}
    • Starting Number: 1

  • Create a custom currency field on the Offer object
    • Data Type: Currency
    • Field Label: Offer Amount
    • Field Name: Offer_Amount

  1. Data Modeling
  2. Create Object Relationships

What Are Object Relationships?

To start, create a custom object called Favorite and add a field to the object.

  1. Click the Object Manager tab.
  2. Click Create | Custom Object in the top-right corner.
  3. For Label, enter Favorite.
  4. For Plural Label, enter Favorites.
  5. Check the box for Launch New Custom Tab Wizard after saving this custom object.
  6. Leave the rest of the values as default and click Save.
  7. On the New Custom Object Tab page, click the Tab Style field and select a style you like.
  8. Click NextNext, and Save.

Create a Lookup Relationship

We’re going to create two custom relationship fields on the Favorite object. First, let’s create a lookup relationship that lists the users who select Favorite for a property.

  1. From Setup, go to Object Manager | Favorite.
  2. On the sidebar, click Fields & Relationships.
  3. Click New.
  4. Choose Lookup Relationship and click Next.
  5. For Related To, choose Contact. For the purposes of DreamHouse, contacts represent potential home buyers.
  6. Click Next.
  7. For Field Name, enter Contact, then click Next.
  8. Click NextNext, and Save.

Create a Master-Detail Relationship

Now, we’re going to create a second relationship field. We want a master-detail relationship where Property is the master and Favorite is the detail.

  1. On the Object Manager page for the custom object, click Fields & Relationships.
  2. Click New.
  3. Select Master-Detail Relationship and click Next.
  4. For Related To, choose Property.
  5. Click Next.
  6. For Field Name, enter Property and click Next.
  7. Click NextNext, and Save.

Now, if you look at a Property record, you’ll see Favorites listed in the related tab.

Add a Favorite Property

Let's take a look at how to view favorite properties.

  1. From the App Launcher ( in the navigation bar), find and select Sales.
  2. Click the Properties tab in the navigation bar. If you don’t see it, look under the More dropdown.
  3. Click the name of a Property record.
  4. Click Related. You’ll see Favorites (0) in the related tab.
  5. Click New.
  6. Enter a name for Favorite Name, then click Save.

Great job! Our Favorite object is all set up.


과제

Create relationships for the Offer object

The object you created for the previous challenge is pretty handy. Imagine how much more useful it would be if brokers could specify which client made an offer and which property the client wants to buy. Add two relationships to the Offer object so brokers can capture this data in Salesforce. Create a Master-Detail relationship with the Property object and a Lookup relationship with the Contact object.

Even if you're completing this module as part of the Admin Beginner trail, be sure you use the new Trailhead Playground you created in the previous unit.

Before You Start:

  • Create the Property object as described in the previous unit.

Challenge Requirements:

  • Create a custom Master-Detail field on the Offer object
    • Data Type: Master-Detail
    • Field Label: Property
    • Field Name: Property
  • Create a custom Lookup field on the Offer object
    • Data Type: Lookup
    • Field Label: Contact
    • Field Name: Contact