Modify the User Experience

What You’ll Do

  • Modify the Battle Station page layout.
  • Add a Roll-up Summary for Resources.

Page layouts allow you to customize the look and feel of detail and edit pages in Salesforce. You can also use page layouts to control which fields, related lists, and custom links users see, which standard and custom buttons appear on detail pages and related lists, and determine whether fields are visible, read only, or required on detail and edit pages. Yes... you can do a lot with page layouts.

Modify the Battle Station Page Layout

You are going to move some fields around and add a few related lists to make the user interface more productive and appealing.

You can edit the page layout from the Custom Object definition page. But first you need to add a new Battle Station record.

Click the App Launcher Waffle icon, then select the Battle Station Construction app. Click the Battle Stations tab, then the New button. Enter any name that you'd like for your Battle Station (Obliteration Station has a nice ring to it!) and then Save the record.

What you see now is the default layout for the Battle Station that the Salesforce Platform generated for you. Let's move some fields around to make this easier to work with. We'll move the Project and Weapons Status fields to the right a little.

  1. Click the gear icon Gear icon and select Setup. This launches Setup in a new tab.
  2. Click the Object Manager tab next to Home.
  3. Click the name of your object (in this example, click Battle Station).
  4. Select the Page Layouts and select the Battle Station Layout.
  5. Scroll down to the Battle Station Detail section and drag the Project Status field to the right column (below Owner field).
  6. Drag the Weapons Status field to the right column (below Project Status field).

There's a lot more info for the related list records than is currently showing. Edit the layout for the related lists to include more info on the page.

  1. Click the wrench icon next to the Resources label in the related list to bring up the properties editor modal.
  2. Add the Quantity and Utilization field to the right side by selecting them and clicking the Add arrow in the middle.
  3. Click OK to close the modal.

Do the same thing for the Supplies related list and add the Quantity, Unit Cost, and Total Cost fields, in that order.

The Page Layouts tab within Object Manager is used to modify the related lists for the Battle Station object.

If you like the way things look, or even if you don't, click the Save button in the floating layout editor in the top left.

Add Some Battle Station Data

Now that you have your page layout looking awesome, it's time to enter some data so you can really get a feel for how the application functions.

It takes a large number of people to build and operate a Battle Station so let's assign some resources to your project. Enter some resource records and set the quantities you may need plus a target utilization percentage. Feel free to be as creative as you'd like. Here are some types of resources you might need to build your Battle Station:

Click the App Launcher Waffle icon, then select the Battle Station Construction app. Click the Battle Stations tab, and then select the Obliteration Station (or name that you chose) record. Under the Related tab, click New on the Resources list.

Enter the following Resource Name options one at a time (click Save & New after entering each record). Choose the Quantity and Utilization of your choice (see image for reference).

  • Dark Lord
  • Admiral
  • Construction worker
  • Left-handed monkey wrench adjuster
  • Robert the foreman
  • Exhaust Port Inspector
  • Sandwich maker
  • Massage therapist
  • Yoga instructor
  • Battle trooper with ridiculously thin armor & terrible aim

Now you need to do the same thing for supplies and equipment. Here is some "stuff" that you might need to build a Battle Station:

For the Obliteration Station record, you need to add the supplies. Under the Related tab, click New on the Supplies list.

Enter the following Supply Name options one at a time (click Save & New after entering each record). Choose the Quantity and Unit Cost of your choice (see image for reference).

  • Light bulbs
  • Planet-destroying laser (typically a quantity of 1)
  • Donuts
  • Hot glue gun
  • Cantina band instruments
  • Laser protecting eyewear (that is, sunglasses)
  • Steel
  • Toilet paper

Related tab for the Obliteration Station record, which is used to add supplies.

Add a Roll-Up Summary Field

As projects grow it becomes difficult to keep a handle on what's going on. As you add more and more resources, it's hard to tell how many people are actually assigned to the project based on the limited number of records that display in the related list section. Let's fix this so you can see the total number of resources at a single glance.

When we created the Master-Detail relationship from resources to battle stations, it provides us with some additional functionality for free. You can create a roll-up summary field that will automatically display the total number of resources on the Battle Station record.

  1. Click the gear icon Gear icon and select Setup. Click the Object Manager tab next to Home.
  2. Click Battle Station.
  3. Select the Fields & Relationships section from the left navigation.
  4. Click the New button.
  5. For Data Type, select Roll-Up Summary, and click Next.
  6. Fill in the custom field details and click Next
    • Field Label: Crew Members
    • Field Name: Crew_Members
  7. Click Next.
  8. For your summary calculation, choose Resources as the Summarized Object, select Sum for the Roll-Up Type and then choose Quantity as the Field to Aggregate.
  9. Click Next.
  10. Click Next again to accept the default field visibility and security settings.
  11. Click Save to add the Crew Members field to the page layout and save the Crew Members field.

Now go back to your Battle Station record and you should see a total of all resources underneath the Battle Station Name. Please refresh the browser page, if the changes are not visible. Pretty nifty, huh?


Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities