📣 Attention Salesforce Certified Trailblazers! Link your Trailhead and Webassessor accounts and maintain your credentials by December 14th. Learn more.
close
trailhead

Create a Custom Object in Salesforce

Build a Custom Object

The Custom Object will be used to store the data received from the device.

  1. Return to the Salesforce page
  2. Click the Setup icon in the top-right navigation menu and select Setup. Select Setup from the top-right gearwheel icon
  3. Click the Object Manager tab next to Home. On the Salesforce navigation bar, click on the Object Manager tab
  4. Click the Create dropdown and then select Custom Object. In the Object Manager Setup view, click on Create then Custom Object
  5. In the New Custom Object form fill in:
    1. In the Custom Object Information section:
      1. Label: SmartFridge
      2. Plural Label: SmartFridges
      3. Object Name: SmartFridge
    2. In the Enter the Record Name Label and Format section:
      1. Record Name: Reading Id (replace the default SmartFridge Name).
      2. Data Type: Auto Number
      3. Display Format: R-{0000}
      4. Starting Number: 1 The Custom Object definition is ready to be saved
    3. Click Save.
  6. On the SmartFridge Custom Object page, make sure that the API Name is SmartFridge__c. On the SmartFridge Custom Object page, make sure that the API Name is correctly set
  7. Select the Fields & Relationships section from the left navigation.
    1. Click New.
    2. Create a field for the temperature.
      1. In the Step 1. Choose the field type section:
        1. Data Type: Number
        2. Click Next
      2. In the Step 2. Enter the field details section:
        1. Field Label: temperature
        2. Length: 4
        3. Decimal Places: 2
        4. Field Name: temperature Enter the details of the Custom Object's temperature field
      3. Click Next, Next, and then Save & New.
    3. Create a field for the humidity.
      1. In the Step 1. Choose the field type section:
        1. Data Type: Number
        2. Click Next.
      2. In the Step 2. Enter the details section:
        1. Field Label: humidity
        2. Length: 4
        3. Decimal Places: 2
        4. Field Name: humidity
      3. Click Next, Next, and then Save & New.
    4. Create a field for the door status.
      1. In the Step 1. Choose the field type section:
        1. Data Type: Picklist
        2. Click Next.
      2. In the Step 2. Enter the details section:
        1. Field Label: door
        2. Values: Select Enter values, with each value separated by a new line.
        3. Enter Open and Closed on separate lines.
        4. Field Name: door Enter the details of the Custom Object's door field
      3. Click Next, Next, and then Save & New.
    5. Create a field for the timestamp.
      1. In the Step 1. Choose the field type section:
        1. Data Type: Date/Time
        2. Click Next.
      2. In the Step 2. Enter the details section.
        1. Field Label: ts
        2. Field Name: ts
      3. Click Next, Next, and then Save & New.
    6. Create a field for the device’s ID.
      1. In the Step 1. Choose the field type section:
        1. Data Type: Text
        2. Click Next.
      2. In the Step 2. Enter the details section:
        1. Field Label: deviceId
        2. Length: 16
        3. Field Name: deviceId
        4. Check Always require a value in this field in order to save a record.
        5. Check Set this field as the unique record identifier from an external system. Enter the details of the Custom Object's device ID field
      3. Click Next, Next, and then Save.
  8. Make sure that SmartFridge Fields & Relationships looks like this. Verify that all of the SmartFridge Custom Object's new fields have been set correctly before proceeding

We won’t check any of your setup. Click Verify Step to go to the next step in the project.

retargeting