Modify the User Experience
Accessibility
This unit requires some additional instructions for screen reader users. To access a detailed screen reader version of this unit, click the link below.
Open Trailhead screen reader instructions.
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 Space Station Page Layout
You’re 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 Space Station record.
- Click the App Launcher .
- Select the Space Station Construction app.
- Click the Space Stations tab, then New.
- Enter any name that you'd like for your Space Station (The Mother Ship has a nice ring to it!) and then Save the record.
What you see now is the default layout for the Space Station that the Salesforce Platform generated for you. Now move some fields around to make this easier to work with. Move the Project and Shield Status fields to the right a little.
- Click and select Setup.
- Click the Object Manager tab next to Home.
- Click the Space Station object.
- Select the Page Layouts and select the Space Station Layout.
- Scroll down to the Space Station Detail section and drag the Project Status field to the right column (below Owner field).
- Drag the Shield 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.
- Click the wrench icon next to the Resources label in the related list to bring up the properties editor modal.
- Add the Quantity and Utilization field to the right side by selecting them and clicking the Add arrow in the middle.
There should now be 3 items in the Selected Fields: Resource Name, Quantity, Utilization.
- 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.
There should now be 4 items in the Selected Fields: Supply Name, Quantity, Unit Cost, Total Cost.
- Click OK.
- Click Save.
Add Some Space 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 Space 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 Space Station.
- Click the App Launcher
- Select the Space Station Construction app.
- Click the Space Stations tab, and then select the Space Station record that you created.
- Under the Related tab, click New on the Resources list.
- Enter these Resource Name options one at a time (click Save & New after entering each record). Choose the Quantity and Utilization of your choice. Click Save after the last resource record to show everything entered.
Chief Navigator
Construction worker
Left-handed monkey wrench adjuster
Robert the foreman
Exhaust Port Inspector
Sandwich maker
Vibe Manager
Now you need to do the same thing for supplies and equipment. Here is some "stuff" that you might need to build a Space Station:
- For the (The Mother Ship or name you chose) record, you need to add the supplies.
- Under the Related tab, click New on the Supplies list.
- Enter these Supply Name options one at a time. (Click Save & New after entering each record.) Choose the Quantity (defaults to 2 but you can edit) and Unit Cost of your choice.
Light bulbs
-
Docking bay door
(typically a quantity of 1)
Donuts
Hot glue gun
Plates
Sunglasses
Steel beams
Toilet paper rolls
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. Fix this so you can see the total number of resources at a single glance.
When you created the Master-Detail relationship from resources to space 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 Space Station record.
- Click and select Setup, then click the Object Manager tab next to Home.
- Click Space Station.
- Select the Fields & Relationships section from the left navigation.
- Click New.
- For Data Type, select Roll-Up Summary, and click Next.
- Fill in the custom field details and click Next.
- Field Label:
Crew Members
- Field Name:
Crew_Members
- Click Next.
- 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.
- Click Next.
- Click Next again to accept the default field visibility and security settings.
- Click Save to add the Crew Members field to the page layout and save the Crew Members field.
Now go back to your Space Station record and you should see a total of all resources underneath the Space Station Name. Refresh the browser page if the changes are not visible. Pretty out of this world galaxy, huh?
Resources