- Salesforce Platform Developer I Certification Guide
- Jan Vandevelde Gunther Roskams
- 579字
- 2021-08-20 10:02:14
Creating custom objects and custom fields
As explained before, we need objects to store data, such as a sheet in Excel. In our case, we would like to store movies, actors, actresses, directors, production companies, and maybe more later on. We will need objects for those. For each record of a particular type, you also want to capture some specifics/attributes. For example, if we create a movie record, we don't only want to save the title, but maybe also the release date, the budget, the director, a cover image, and so on. Just like in Excel, the columns you define to capture data in Salesforce correspond to fields for saving data about a particular record. So, let's create some of those and give our app some body (build our app out a bit more).
Let's first create the Movie object:
- Navigate to Setup and click the Object Manager tab.
- On the right-hand, side click Create | Custom Object.
- Then, enter the following details:
- Label: Movie
- Plural Label: Movies
- Object Name: This should be filled automatically with Movie
- Record Name: This should be the movie title with a data type of Text
- Check the following checkboxes:
- Allow Reports
- Track Field History
- Allow In Chatter Groups
- Allow Sharing
- Allow Bulk API Access
- Allow Streaming API Access
- Deployed
- Allow Search
- Launch New Custom Tab Wizard after saving this custom object and hit Save
- This will open the Tab Creation Wizard. Now, select TV Widescreen as the Tab Style and hit Next.
- Leave the default for the Profile selection, which should be Default On, for all profiles and then hit Next.
- Deselect all custom apps and only select our newly created BIM DB app in the Include Tab column. Leave the checkbox at bottom of the page, Append tab to users' existing personal customizations, checked and hit Save.
Great! You've just created a custom object called Movie that comes with its own tab and you've added this tab to our custom app, called BIM DB. Go and check it out as you did previously through the App Menu, click the BIM DB app, and you should see it has two tabs—our Home and Movie tabs:

Now, let's add some custom fields to our Movie object to capture some relevant information about each movie:
- Navigate back to Setup and click the Object Manager tab
- Use the Quick Find search box to easily find our Movie object and click the Movie object to open it
- In the Fields & Relationships section, click the New button to create a new field
- Chose the Date type, click Next, and give it a Field Label of Release Date
- Make sure that Field name is auto-populated with Release_Date (watch the underscore), if not, enter it and click Next
- Leave the defaults for field-level security and click Next
- Leave the default Movie Layout selected and click Save
Congratulations! You have created a new custom field that will capture the date when the movie was released. Now, you need to create the following fields and objects.
Just follow the same steps, but ensure that each field/object is specified from the following table:

As a rule of thumb for these exercises, you can always choose All Profiles to have access to the fields and objects you are creating. Of course, we could absolutely create more fields on all of those objects, but let's keep it at a minimum for now. We will be adding some fields later in the book.
- Word/Excel/PPT 2013辦公應(yīng)用從入門到精通
- 金蝶ERP-K/3培訓(xùn)教程:財(cái)務(wù)/供應(yīng)鏈/生產(chǎn)制造(第2版)
- Excel 2007函數(shù)與公式實(shí)戰(zhàn)技巧精粹
- 新編Office 2016應(yīng)用大全(實(shí)戰(zhàn)精華版)
- 新編電腦選購、組裝、維護(hù)與故障處理從入門到精通
- Excel 2013從新手到高手(超值版)
- Excel 職場(chǎng)手冊(cè):260招菜鳥變達(dá)人
- 快·易·通:2天學(xué)會(huì)Word/Excel綜合辦公應(yīng)用(2016版)
- Final Cut Pro X基礎(chǔ)培訓(xùn)教程
- PPT制作事半功倍
- PPT制作應(yīng)用大全
- 辦公自動(dòng)化精品教程
- Excel市場(chǎng)分析應(yīng)用之道
- Word 2007辦公應(yīng)用融會(huì)貫通
- WPS Office 從入門到精通