© Rakesh Gupta 2020
R. GuptaSalesforce Platform App Builder Certificationhttps://doi.org/10.1007/978-1-4842-5479-0_4

4. Customizing the User Interface

Rakesh Gupta1 
(1)
Katihar, India
 

In Chapter 3, we studied the Salesforce sharing architecture, including OWD and role hierarchies. We saw how different real-world problems can be solved by using various sharing mechanisms. Last, we looked at how profiles and permission sets play a key role in handling object- and field-level security in Salesforce.

This chapter is divided into three sections: taking a deep dive into Lightning Experience; creating dynamic Lightning pages; and enabling custom buttons, links, and actions.

A Deep Dive into Lightning Experience

Unlike Salesforce Classic, the engine behind Lightning Experience is a user’s device agnostic. What does that mean? Well, mobile use has been increasing exponentially—be it at the workplace or for personal use. Sales reps are now using mobile devices to find potential customers, use social media to connect with customers, and more. Lightning Experience mimics the way sales reps work on a mobile platform and thus provides a seamless experience across platforms.

Lightning Experience is a fresh and productive user interface. It is aimed at helping sales reps close more deals quickly by providing flexible, intuitive, and interactive tools. The tools enable the reps to focus on deals, customers, and activities that promise the greatest returns. The sophisticated Lightning Experience user interface, coupled with Einstein’s predictive modeling, turbocharge sales rep productivity exponentially by enabling them to take the step at the right time, with the right customer, on the right deal.

In addition to being faster, Lightning Experience enables system administrators to deliver a pleasant user experience by quickly building a Lighting page to suit a user’s working style or needs. Lightning Experience uses a component-based design pattern. This means, to build a Lightning page, all you have to do is place components onto a page at the location of your choice! Let’s go ahead and see what Lightning Experience looks like.

The Lightning Experience Navigation Menu

Similar to the navigation menu in Salesforce Classic, Lightning Experience also displays tabs across the top of the screen. Furthermore, with Lightning Experience, as with Classic, end users can customize the navigation menu to suit their working style and needs. Via the navigation menu, users can take the following actions (Figure 4-1):
  • Switch apps via App Launcher.

  • Identify the current app’s name.

  • Access recent records.

  • Create new records.

../images/472313_1_En_4_Chapter/472313_1_En_4_Fig1_HTML.jpg
Figure 4-1

Lightning app navigation menu

In addition, end users can customize the navigation menu (including reordering and adding/removing tabs) by adding the following items to the menu:
  • Standard objects

  • Custom objects

  • Home tab

  • Visualforce tabs

  • Lightning component tabs

  • Web tabs

  • Canvas apps via Visualforce tabs

The App Launcher in Lightning Experience

As mentioned, Lightning Experience allows a user to switch between apps using App Launcher. Apps show up as large tiles under All Apps. The apps list can include standard apps, custom apps, and connected apps, such as G Suite. Other items, such as custom objects, tasks, events, and feeds, show up under All Items. Users can find apps by searching for the app name in the search box (1 in Figure 4-2) or by using the App Launcher (2 in Figure 4-2).
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig2_HTML.jpg
Figure 4-2

Access App Launcher

In addition, users can also personalize the order of the apps on this page by dragging the tiles per their needs (Figure 4-3). However, be aware that a Salesforce administrator can override the app sort order set by users.
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig3_HTML.jpg
Figure 4-3

Rearrange apps in Lightning

The app menu lists all apps installed in the org. However, the apps users see in App Launcher and in the app menu may vary based on visibility settings and user permissions set on their profile.

The Home Page

Users can customize the home page to display key information helpful in conducting their daily tasks effectively and efficiently. From the home page, users can manage daily tasks and events, including viewing top deals, the chat feed, recent records, quarterly performance, and more, as shown in Figure 4-4.
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig4_HTML.jpg
Figure 4-4

Lightning home page

Furthermore, unlike Classic, with Lightning Experience, users can remove the Home tab from a Lightning app. A Home tab is no longer mandatory!

Global Search

What happens if users have tons of records in Salesforce? How can they get what they need quickly? Well, global search is there to rescue these users!

Global search finds exactly what users are looking for by breaking a search term into small parts. The global search box is available at the top of every page in Lightning Experience. When users click the global search box, they see a drop-down of all recent items, as shown in Figure 4-5.
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig5_HTML.jpg
Figure 4-5

Access global search

If users start typing in the search box, the list updates dynamically with matches from all searchable objects. When users see what they are looking for, then they can select it quickly. As the example in Figure 4-6 shows, if a user types sari in the search box, the system shows all records that contain sari anywhere.
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig6_HTML.jpg
Figure 4-6

Search on a partial word

If users click the global search box from an object-specific view, like from a Leads page, then, the global search looks for leads based on the search string.

Creating Dynamic Lightning Pages

The beauty of Salesforce’s Lightning Experience is that it allows users to create dynamic pages without writing a single line of code. Such features deliver a high level of sophistication and customization in Lightning Experience that is missing from Classic.

Controlling Component Visibility

Let’s return to Robin Guzman, a Salesforce administrator at GoC. His basic understanding of Lightning Experience—how to navigate within it and create a Lightning page—has increased greatly. He created a Lightning record page (Lead Record page) for the Lead object and made it the org default (Figure 4-7).
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig7_HTML.jpg
Figure 4-7

Lead Lightning page

Now he wants to learn how to make the Files component dynamic on the Leads record page based on the logged-in user. Specifically, he wants to hide the Files component from the system administrator.

Robin does the following to solve the preceding business requirement by leveraging the component visibility setting:
  1. 1.
    He navigates to Setup (gear icon) ➤ SetupObject ManagerLeadLightning Record Pages and locates the Lead record page (Figure 4-8).
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig8_HTML.jpg
    Figure 4-8

    Lightning record page

     
  2. 2.

    Robin clicks Edit and navigates to Lightning App Builder.

     
  3. 3.
    To add component visibility, Robin clicks the Files component (1 in Figure 4-9) and then clicks the + Add Filter button (2 in figure 4-9), which is available under Set Component Visibility.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig9_HTML.jpg
    Figure 4-9

    Lightning App Builder

     
  4. 4.
    This action redirects Robin to a new window, where he selects the filter type, field, operator, and value as follows:
    1. a.

      For Filter Type, she selects Advanced.

       
    2. b.

      For Field, he selects Profile Name by navigating to UserProfileName.

       
    3. c.

      For Operator, he selects Not Equal.

       
    4. d.

      For Value, he selects System Administrator.

       
     
  5. 5.
    In the end, Robin’s screen looks look the one in Figure 4-10.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig10_HTML.jpg
    Figure 4-10

    Set component visibility

     
  6. 6.

    He clicks the Done button.

     
  7. 7.

    After completing all configurations, he saves the Lightning page by clicking the Save button.

     

When Robin clicks the Save button, Salesforce recalculates the sharing settings of the components added to the Lead Lightning record page and removes Files component access from a system administrator. This may be an eye opener! It is important to know and understand that even a system administrator is not immune from not having visibility access to a component. Powerful indeed!

Likewise, users can control visibility of components on the Lightning record page, app page, home page, and Lightning for Outlook page.

Lightning Page Assignment

In Lightning Experience, users can set Lightning page assignments based on different parameters. For example, users can create multiple Lightning Lead record pages and then assign them based on the following parameters:
  • Assign a page as an org default.

  • Assign a page as the default for specific Lightning apps. For instance, users can have multiple Lead lightning pages based on different Lightning apps. Users can assign Lead record pages (Sales) to the Lightning Sales app. Similarly, they can assign Lead record pages (Service) to the Lightning Service app.

  • Use a combination of app, record type, and profile.

Robin has now become a pro in creating Lightning record pages and knows how to show and hide components from them. He created a Lightning record page for Lead called Lead Record Page (Sales). Next he wants to assign this record page to the Sales app so that whenever users open the Lightning Sales app, they see this page for the Lead record. Robin performs the following steps to meet this requirement using the page visibility setting:

  1. 1.

    He navigates to Setup (gear icon) ➤ SetupObject ManagerLeadLightning Record Pages and then locates Lead Record Page (Sales).

     
  2. 2.

    Robin clicks Edit and navigates to Lightning App Builder.

     
  3. 3.

    To add component visibility, he clicks the Activation button at the right-hand top corner. The system redirects Robin to a new window to set up the Lightning page assignment.

     
  4. 4.
    Robin clicks the APP DEFAULT tab and then the Assign as App Default button to set the Lightning page for the Lighting Sales app, as shown in Figure 4-11.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig11_HTML.jpg
    Figure 4-11

    Set Lightning page assignment

     
  5. 5.

    Then he selects the app: Sales.

     
  6. 6.
    Robin clicks the Next button, as shown in Figure 4-12.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig12_HTML.jpg
    Figure 4-12

    Assign a Lightning page to apps

     
  1. 7.
    He then reviews the assignment and clicks the Save button, as shown in Figure 4-13.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig13_HTML.jpg
    Figure 4-13

    Review the Lightning page assignment

     

After Robin clicks the Save button, Salesforce recalculates the sharing settings and page assignment for the Lead object. Going forward, users will see the Lead Record Page (Sales) when they select the Lightning Sales app and open the Lead record.

Use Case for Custom Buttons and Links

Each business unit has its own set of requirements that may require specific configuration. For example, if users are responsible for managing vendors and they want to allow access to an Account page from outside the org (e.g., for a vendor management system), then Salesforce requires users to create a custom button or a link.

A custom button or a link allows users to integrate Salesforce data from external applications or data from a company’s internal portal, for example. The ability to access Salesforce data from an external application—with a click of a button or a link—boosts user productivity several-fold.

In Lightning Experience, custom buttons and links, when added to a page layout, appear in different regions of a Lightning page. Here are the different types of custom buttons and links users can create in Salesforce:
  • List button: Appears in a related list of an object’s record page.

  • Detail page link: Appears in the Links section of the details page of an object’s record.

  • Detail page button: Appears in the action menu in the highlight panel of an object’s record page.

Let’s rejoin Robin, who has just received a requirement to create a custom button on a Lead page to search a lead company using Google search. After clicking the button, it should open a Google search page and find details about the lead company.

Robin performs the following steps to meet this requirement by creating a custom button:
  1. 1.

    He navigates to Setup (gear icon) ➤ SetupObject ManagerLeadButtons, Links and Actions.

     
  2. 2.
    Robin clicks New Button or Link, which redirects him to a new window to set up a custom button. Once there, he works his way through by entering information as follows:
    1. a.

      Label: Robin names her custom button Open Google Search.

       
    2. b.

      Name: This field autopopulates based on the label.

       
    3. c.

      Description: Robin writes some meaningful text so that other developers and administrators can understand easily why the custom button was created in the first place.

       
    4. d.

      Display Type: He selects Detail Page Button.

       
    5. e.

      Behavior: He selects Display in existing window without sidebar.

       
    6. f.

      Content Source: He selects URL, then pastes the following URL into the large text box: https://www.google.com/search?q={!Lead.Company}.

       
    In the end, Robin’s screen looks like the one depicted in Figure 4-14.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig14_HTML.jpg
    Figure 4-14

    Creating a custom button

     
  3. 3.

    Robin clicks the Save button.

     
  4. 4.

    Next, he adds a new custom button to the Lead page layout by navigating to Setup (gear icon) ➤ SetupObject ManagerLeadPage layouts.

     
  5. 5.
    Then he clicks the Edit link and drags and drops the custom button Open Google Search to the Salesforce Mobile and Lightning Experience Actions section of the page layout, as shown in Figure 4-15.
    ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig15_HTML.jpg
    Figure 4-15

    Adding a button to Lightning Experience

     
  6. 6.

    Robin clicks the Save button.

     
  7. 7.

    He makes sure to whitelist the https://www.goggle.com URL.

     
Going forward, the Open Google Search custom button is available in the Lead record page’s highlight panel, as shown in Figure 4-16.
../images/472313_1_En_4_Chapter/472313_1_En_4_Fig16_HTML.jpg
Figure 4-16

Accessing the custom button

Likewise, users can add a custom link to an Account’s record page to make an account manager’s life easier. Furthermore, they can also add Sales guideline pdf custom links to the Opportunity record page to improve a team’s productivity.

Use Case for Custom Actions

Actions allow users to perform certain activity very quickly, such as create records, update records, send e-mail, log calls, call a Lightning component, execute Lightning Flow, and call a Visualforce page. With custom actions, users save precious time by getting quick access to important information. There are two types of actions available to users: object specific and global:
  1. 1.
    Object-specific actions: Object-specific actions have automatic relationships to other records. The actions let users quickly create or update records, send e-mail, log calls, call Lightning components, execute Lightning Flow, and call a Visualforce page in the context of a particular object. A few examples of object-specific actions include the following:
    1. a.
      Creating a custom action on Opportunity object to update Stage to Closed Lost, as shown in Figure 4-17.
      ../images/472313_1_En_4_Chapter/472313_1_En_4_Fig17_HTML.jpg
      Figure 4-17

      Updating the Opportunity object

       
    2. b.

      Creating a Record Create action (Create Order) from Opportunity without leaving the Opportunity record page.

       
     
  2. 2.

    Global actions: Users can create global actions in Setup, then put global actions anywhere on an object that supports actions. Using global actions, users can log calls, create records, send e-mail, call a Visualforce page, execute a Lightning component, and call Custom Canvas all without leaving the page.

     

In Chapter 6, we see how to use custom actions to call Lightning Flow.

Points to Remember

  • Users can’t personalize the navigation bar when it contains more than 50 items.

  • When a system administrator removes an item from an app, that item remains in users’ personalized navigation bars. Then, if they so choose, users can delete the item.

  • Lightning apps aren’t available in Classic.

  • The object-specific Send Email action is only available on cases.

  • To show custom buttons, links, or actions in Lightning Experience, you must customize the Action section of a page layout. If you do not, then you will see whichever default buttons, actions, and links are defined by Salesforce.

Hands-on Exercises

The following exercises will give you more practice with the platform, which ultimately will help you in gaining mastery of it, and also will assist you in preparing for the certification examination. Remember, these are hands-on exercises, and you can find the answers at the back of the book in the Appendix, but try to implement them in your Salesforce org, which is the primary goal of doing them.
  1. 1.

    Edit a Lightning record page of a Lead object and explore different components. Test out its role and functionality.

     
  2. 2.

    Create a custom button to open a Yahoo News page for Account.

     
  3. 3.
    Dennis Williams, a system administrator at GoC, has received the following requirements:
    • On an Account Lightning record page, hide the News component from those users that do not have Access Activities permission.

    How would you instruct Dennis to perform this task?

     
  4. 4.

    Dennis Williams has new requirements: create a quick action on the Lead object to update Status quickly to Unqualified, then add the quick action to all Lead record pages. How would you instruct Dennis to perform these tasks?

     
  5. 5.
    Create a custom Lightning app (named Sales Critical) and add the following tabs to it:
    • Home

    • Lead

    • Account

    • Contact

    • Opportunity

    • Campaign

    Then, list all your new findings, including app logo size, navigation style, and app personalization settings, and add a Utility Item section.

     

Summary

In this chapter, we looked at an overview of Lightning Experience, followed by an in-depth study of the dynamic record pages. We also examined custom buttons, links, and actions use cases with real-life examples. In Chapter 5, we take at deep dive into how to improve and enrich data quality in Salesforce.

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

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