Salesforce Platform Developer I Certification Guide
上QQ阅读APP看书,第一时间看更新

Creating records

Before checking things out, let's just create one sample movie record:

  1. Go to your BIM DB app (through the App Launcher).
  2. Click the Movies tab.
  3. Click New and enter the following values:
  • Movie Title: The Godfather.
  • Release Date: 24th August 1972 (the format is dependent on your user locale settings).
  • Description: This movie is about the mafia. The patriarch of an empire of organized crime gives his legacy to his reluctant son.
  • Genre: Crime, Drama.
  • Cover: This is a rich-text field that allows us to upload images into it. In the .zip file with all assets, you'll find a folder called BIM DB-app containing a sub-folder called Movies. You will find a cover picture in there for The Godfather. So, in the field, just click the little image icon to insert an image and upload the picture from the folder.
  • Budget: 6.000.000.
  • Runtime: 175 (this will be in minutes!).
  1. Click Save and you should have the same screen shown in the following screenshot:

You will see the three tabs (Movies, Persons, and Companies); that's because we Launched Tab creation while creating our objects. Following the table, we didn't create a tab for the Review object, so it's good if you don't have one. But don't worry if you do, as it won't affect the exercises.

We did not create a tab for reviews because, in the next section when we talk about relationships, we will always want a review to be linked to a certain Movie. So, when we wish to see reviews, we should search for the Movie and then see all its reviews as a related list on the Movie.

Now, let's also create a Person record and a Company record:

  1. Create a new Person with the following details:
  • Name: Al Pacino
  • Birthdate: April 25th, 1940
  • Biography: Here comes the biography of Al Pacino, one of the most popular actors in history. Al Pacino became popular in the 1970s and became an iconic figure in the world movies.
  1. Create a Company record with the following details:
  • Company Name: Paramount Pictures
  • Address: 5555 Melrose Ave, Los Angeles, CA 90038, USA

I'm pretty sure that you already guessed where we are going with this, right? Al Pacino is the main actor in The Godfather movie, and Paramount Pictures is the production company, but, at the moment, we have absolutely no relationship in our database showing that they have anything to do with each other. We just have three individual records and that is it.

We will solve this problem in the next section, where we will create one or more relationships and add some more data to our database.