Adding Fields

,

Once again, you can quickly add a few more fields to the Position object.

1.
Return to the Setup menu for the Position object by clicking Setup Create Objects Position.

2.
Add the fields described in the table below to the Position object, clicking Save and New each time.

Table 3. Additional Fields for Position object
Data TypeField LabelLengthRequired
Text Area (long)Job Description2,000 - Visible Lines - 5N/A
Text Area (long)Responsibilities2,000 - Visible Lines - 5N/A
DateStart DateN/AYes

The fields in the previous table give you a bit of practice using the Setup menu to add fields. In your every day development tasks, you can use either the Setup menu or the Force Platform IDE, which you will learn about in Chapter 8: The Force Platform IDE, to define objects.

The Force Platform includes a Metadata API, which also allows you to use a script for creating Force Platform components. You will use scripts to create almost all of the remaining objects and fields you use for examples in the rest of this book.

You have one more field to add to the Position object at this time, a field which unlocks some key flexibility in moving data from external sources into the Force Platform database.

3.
Add a Text field and give it a Field Label of Legacy ID, a Length of 10 and an appropriate description and help text.

4.
Select the Unique and External ID checkboxes.

The External ID provides an important piece of flexibility for the Force Platform database. Like many organizations, Universal Containers is creating a Force Platform application to replace and improve an existing application with an on-demand system. In the existing application, each Position has a unique ID.

As mentioned earlier, every record in the Force Platform database has an internal ID uniquely identifying the record. This ID is used to implement relationships between objects, among other things. As you load data into your Force Platform objects, the ID is assigned when the records are inserted into the database.

This simple fact creates a problem for records that are children in a relationship. The actual value stored in the relationship field is the ID of the parent. How can a child record know that ID in advance so the relationship can be established as part of the data load?

The External ID is the solution. When you define an External ID, you can specify that the value in that field be used to establish relationships. The Force Platform identifies the parent record with that value for the External ID and automatically copies the ID of the record into the relationship field of the child.

With this identification established through the External ID, you can complete the definition of the Position object.

Tip

You can also use an External ID to update records which already have values, which the scripts you use to update your organization at the start of some chapters will have to do. For this reason, most of your objects will have an External ID field added to them as part of those scripts.

5.
Click Next to save the information, and Next again to accept the default security settings.

6.
On the final page, uncheck the Add Field box, since there is no need to see this Legacy ID on the user interface page. Click Save.

Once the object is created, click the Positions tab to see the new layout. The Recent Items view displays, which currently only shows the Position ID. This view can be much more informative, a situation addressed in the next section.

7.
Select the Position record you entered before to bring up the new detail page and then Edit to show the page below. Enter values for the fields displayed and click Save.

Figure 37. The new Position entry page


Note

You will learn much more about searching for records in a variety of ways in Chapter 6: Reaping Value Through Reports.


When you return to the detail page, you can see that the long text areas are displaying correctly. But you will still like to fix that initial view, and you can add some additional user interface functionality at the same time. You will, indeed, improve the appearance of the view, but first you should load more data into the Position object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.186.167