Home Programming Salesforce CRM Admin Cookbook - Second Edition

Salesforce CRM Admin Cookbook - Second Edition

By Paul Goodey
books-svg-icon Book
eBook $43.99 $29.99
Print $54.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $43.99 $29.99
Print $54.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Salesforce CRM's Home Page is Where the Heart is...
About this book
Salesforce CRM is a market-leading customer relationship management (CRM) application that is accessed over the internet. This application greatly enhances a company's sales performance, improves customer satisfaction, and provides a robust customer relationship management system for an organization. Salesforce CRM Admin Cookbook, Second Edition enables you to instantly extend and unleash the power of Salesforce CRM and its Lightning Experience framework. It provides clear, comprehensive instructions along with detailed screenshots and code. Whether you are looking for solutions to enhance the core features, such as data management, process automation, data validation, and home page administration, or are looking for ideas on advanced customization techniques, this book will provide you with immediate, practical, and exciting real-world recipes. This book guides you through interesting topics spanning a variety of functional areas. Recipes are provided that allow you to configure, build and extend the capability of Salesforce CRM using the Lightning Experience framework.
Publication date:
December 2017
Publisher
Packt
Pages
358
ISBN
9781788625517

 

Chapter 1. Salesforce CRM's Home Page is Where the Heart is...

In this chapter, we will cover the following recipes:

  • Building a custom Admin Home page in Lightning Experience
  • Cloning the standard Home page for a customized Lightning Experience
  • Composing a system notification message on the Lightning Experience Home page
  • Providing a system support email link on a customized Home page
  • Creating a personal setup link on a customized Home page
  • Generating a filtered report link on a customized Home page
  • Developing a Lightning component to display a custom logo on a customized Home page
 

Introduction


The Home tab in Salesforce CRM Lightning Experience is generally set as the opening page for users when they first log into the application.

Users of Salesforce like having access to the information and data that is most relevant to them in a quick and easy fashion, and landing on a customized Home page is usually preferred by most users.

Out of the box, the Home page in Salesforce CRM Lightning Experience provides a great way for users to view sales performance and opportunity top deals, tasks and events, account news, recent records, and so on. The following screenshot shows the Salesforce CRM Home tab screen:

The Home page in Salesforce CRM Lightning Experience allows various standard Home page components to be shown, such as Quarterly Performance, Today's Events, or Top Deals (as shown in the preceding screenshot).

In addition to the standard components, it is possible to create custom components with functionality that is not provided by default. Both types of components can be made available to users by customizing the Home page layouts and assigning different Home page layouts to different users based on their profile.

The following recipes are designed to improve the usefulness and relevance of the Home page and also provide additional features and functionality that are not provided natively within the Salesforce CRM application.

 

Building a custom Admin Home page in Lightning Experience


The sales performance or opportunity top deals components, which are provided out of the box on the Home page, give sales people a very good insight into their sale activities. However, sales performance may not necessarily be relevant to or desired by non-sales users with job functions in other areas, such as marketing, service, finance, or even Salesforce system administration.

Rather than presenting the default Home page to all users in all business functions, you can create custom Home pages with features relevant to specific types of users, and assign the customized pages to different user profiles with Lightning App Builder in Lightning Experience.

There are two methods of creating custom Home pages in Salesforce CRM Lightning Experience. These methods involve either editing an existing Home page or creating a new page using a Home page template.

In this recipe, we will create a new custom Home page using Lightning App Builder and a Home page template.

How to do it...

Carry out the following steps to build a new custom Home page using Lightning App Builder:

  1. Click on the Setup gear icon at the top right of the main Home page, as shown in the following screenshot:

  1. Click the Setup option, as shown in the following screenshot:
  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the New button, as shown in the following screenshot:

  1. In the resulting Create a New Lightning Page dialog, choose the Home page Lightning Experience page type, as shown in the following screenshot:
  1. Click on Next.
  2. Now enter Admin in the Label box presented in the next dialog and then click on Next.

 

  1. In the final dialog, keep the tab option set as CHOOSE PAGE TEMPLATE, which shows the selection of Standard Home Page  as default, as shown in the following screenshot:
  1. Click on Finish.
  2. In the resulting Home page Layout screen, drag the desired components from the left-hand components pane, which contains all the standard components available for the Home page, onto the canvas section.

Note

Here, we will drag the Recent Items to the top section, the Chatter Feed to the bottom left, the Chatter Publisher to the bottom right, and the App Launcher component to the right-hand section.

  1. Enter This is a custom Home page created for use by Salesforce CRM Administrators in the Description box of the page, as shown in the following screenshot:

  1. Finally, click on Save, as shown in the following screenshot:

  1. After the page has been saved, the Home page must be activated. Upon saving the page, the Activation... option will be visible, as shown in the following screenshot:

  1. Click on Activation... .

Note

When clicking on Save for the very first time you will be presented with a Page Saved dialog that provides an Activate button to active the page. The dialog also presents a message saying Activate this page to make it visible to your users along with a checkbox with the caption Don't show this message again, which, when checked, prevents the dialog from reappearing.

  1. In the resulting Activation dialog, choose the Assign this Home page to specific profiles option, as shown in the following screenshot:

  1. Click on Next.
  2. In the resulting Select Profiles dialog, choose the System Administrator profile, as shown in the following screenshot:

  1. Click on Next.
  2. Finally, in the resulting Review Assignments confirmation dialog, click on Activate, as shown in the following screenshot:

How it works...

When system administrators navigate to the Salesforce CRM Home page, they are presented with a custom Home page, as shown in the following screenshot:

 

Cloning the standard Home page for a customized Lightning Experience


There are two methods of creating custom Home pages in Salesforce CRM Lightning Experience. One method is to edit an existing Home page and the other is to create a new page using a Home page template. Both methods utilize Lightning App Builder, which allows you to generate and configure the various components and properties of the page.

In this recipe, we will use Lightning App Builder to clone the existing standard Home page.

Getting ready

Carry out the following steps to assign the system administrator profile to the default standard Home page:

  1. Click on the Setup gear icon at the top right-hand corner of the main Home page, as shown in the following screenshot:
  1. Click the Setup option, as shown in the following screenshot:

  1. Type home in the Quick Find search box, as shown in the following screenshot:
  1. Select the Home option.
  2. Click on Set Page Assignments, as shown in the following screenshot:

  1. In the resulting Select Profiles dialog, scroll through the listed profiles and check the System Administrator checkbox, as shown in the following screenshot:

  1. Click on Next.
  2. In the resulting Choose Lightning Page dialog, either verify or choose the System Default option (depending on your current settings), as shown in the following screenshot:
  1. Click on Next.
  2. Finally, in the resulting Review Assignments confirmation dialog, click on Assign, as shown in the following screenshot:

How to do it...

Carry out the following steps to clone the standard Home page using Lightning App Builder:

  1. From the main Home page, click on the Setup gear icon at the top right of the page, as shown in the following screenshot:

  1. Click the Edit Page option, as shown in the following screenshot:

Note

If you have not already created a custom Home page, then behind the scenes, Salesforce makes a cloned copy of the standard Home page when you click Edit Page and subsequently save it. The cloned custom Home page is associated with the standard Home page and a reference is maintained by the system. As new capabilities are introduced to the standard Home page in future releases, these are also made available to your custom Home page. The cloned custom Home page is then loaded for editing within Lightning App Builder.

  1. In the resulting Lightning App Builder page, type Cloned Standard Home Page in the Description field, as shown in the following screenshot:

  1. Click on Save.
  2. Finally, click on Back.

How it works...

The standard Home page is cloned and stored as a custom Home page called Home_Page_Default which is accessible within Lightning App Builder, as shown in the following screenshot:

 

Composing a system notification message on the Lightning Experience Home page


Often there is a need to communicate with the users of your Salesforce CRM application and give updates and status alerts for various reasons.

You can send emails, Chatter posts, and instant messages, for example, to give users dynamic messages about planned releases, system maintenance, and so on; however, to ensure that everyone reads and is shown a more static notification, you can create a message within Salesforce CRM.

In this recipe, we will compose a system notification message on the Home page using Lightning App Builder to edit a customized Home page.

How to do it...

Carry out the following steps to edit an existing Home page to add a system notification message using Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:
  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Default customized Home page, as shown in the following screenshot:

  1. In the resulting Lightning App Builder page, drag and drop the Rich Text component from the standard Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:
  1. Click on the newly added Rich Text component.
  2. Enter Please be aware of routine Salesforce CRM maintenance on 4th July! into the Rich Text properties section.
  3. Choose the text font, size, and color using the text formatter in the right-hand section of the Lightning App Builder, as shown in the following screenshot:
  1. Click on Save, as shown in the following screenshot:
  1. Finally, click on Back.

How it works...

The customized Home page for the assigned users will appear with a system notification message, as shown in the following screenshot:

See also

See the Cloning the standard Home page for a customized Lightning Experience recipe in this chapter.

 

Providing a system support email link on a customized Home page


As a system administrator, you will receive requests for changes to your Sales CRM application. These requests may be received via email, phone call, Salesforce case record, or external case management system. Either way, it is often useful to provide users with a single email address with which they can log issues or request enhancements within Salesforce CRM.

In this recipe, we will create a system support email link that users can click for support using Lightning App Builder to edit a customized Home page.

How to do it...

Carry out the following steps to edit an existing Home page to provide a system support email link using Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:
  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Defaultcustomized Home page, as shown in the following screenshot:
  1. In the resulting Lightning App Builder page, drag and drop the Rich Text component from the standard Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:
  1. Click on the newly added Rich Text component and enter For Salesforce Help please send requests for support to into the Rich Text properties section.

This is shown in the following screenshot:

Note

The Rich Text properties section is located in the right-hand section of Lightning App Builder.

  1. Click the Link icon, as shown in the following screenshot:

  1. Select E-mail, as shown in the following screenshot:
  1. Enter the appropriate details for your organization in the E-Mail Address, Message Subject, and Message Body textboxes, as shown in the following screenshot:

  1. Click on OK.
  2. Choose the text font, size, and color using the text formatter, as shown in the following screenshot:
  1. The Lightning App Builder page should now be configured, as shown in the following screenshot:
  1. Click on Save.
  2. Finally, click on Back.

How it works...

The customized Home page for the assigned users will appear with the system support email link, as shown in the following screenshot:

See also

See the Cloning the standard Home page for a customized Lightning Experience recipe in this chapter.

 

Creating a personal setup link on a customized Home page


All users need to change their Personal Information settings in the Salesforce CRM application from time to time. They may, for example, wish to edit their user information, change their password, or you may need them to grant login access to administrators, plus many other reasons.

Accessing the Personal Information area is done by users clicking their profile picture and then stepping through the options to navigate to the My Personal Information in the setup section of the sidebar. This takes extra clicks and can often be a challenge for less experienced users of the application.

In this recipe, we will create a shortcut link directly on the Home page to allow users to access their Personal Information options with a single click.

How to do it...

Carry out the following steps to edit an existing Home page to create a personal setup link on a customized Home page using Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:

  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Defaultcustomized Home page, as shown in the preceding screenshot:

  1. In the resulting Lightning App Builder page, drag and drop the Rich Text component from the standard Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:
  1. Click on the newly added Rich Text component and enter Quick Personal Setup Link into the Rich Text properties section.
  2. This is shown in the following screenshot:

Note

The Rich Text properties section is located in the right-hand section of Lightning App Builder.

  1. Click the Link icon as shown in the following screenshot:
  1. Select URL for the Link Type.
  2. Select https:// for the Protocol.
  3. Paste or enter the following for the URL: /one/one.app#/settings/personal/PersonalInformation/home
  4. Click on OK, as shown in the following screenshot:

  1. The Lightning App Builder page should now be configured as shown in the following screenshot:
  1. Click on Save.
  2. Finally, click on Back.

How it works...

The customized Home page for the assigned users will appear with the personal setup link, as shown in the following screenshot:

Upon clicking the personal setup link, users will be presented with the Personal Information page, as shown in the following screenshot:

See also

See the Cloning the standard Home page for a customized Lightning Experience recipe in this chapter.

 

Generating a filtered report link on a customized Home page


In this recipe, we are going to provide a link on the Home page that directly calls a filtered report with a parameter to display a subset of the data in the report.

We will initially create an opportunity report that is filtered by the standard Amount field, which we can call directly using a URL link with an Amount parameter.

The URL link that invokes the filtered opportunity report will be generated using the Lightning App Builder and configured on an existing customized Home page.

Getting ready

Carry out the following steps to create an opportunity report that is filtered by the standard Amount field:

  1. Click on the Reports tab.
  2. Click on New Report, as shown in the following screenshot:

  1. In the resulting Create New Report page, select the Opportunities report type.
  2. Click on Create, as shown in the following screenshot:
  1. Click on Add in the Filters section.
  2. Select a filter for the Amount field, choose the option greater or equal, and enter the value 10000.
  3. Click on OK.
  4. Click on Save, as shown in the following screenshot:
  1. In the resulting Save Report dialog, enter High Amount Opportunities in the Report Name textbox.
  2. Enter Report for high amount opportunities in the Report Description textbox.
  3. Select one of your existing folders or leave as default in the Report Folder to save the report.
  4. Click on Save, as shown in the following screenshot:

  1. In the resulting saved Report page, click Run Report, as shown in the following screenshot:
  1. Note the URL that is displayed in the browser address bar as this is the location for the report, as shown in the following screenshot:
  1. In the resulting saved REPORT page, click the Filter icon to take a look at the way the filter for Amount is set as greater or equal "100,000" and get an idea of how we will update the Amount parameter as part of this recipe.

Note

The URL that is generated is https://widgetsxyzlex-dev-ed.lightning.force.com/one/one.app#/sObject/00O0Y000006eJLvUAM/view. You will now need to make a note of only the following part of the report URL/one/one.app#/sObject/00O0Y000006eJLvUAM/view that is shown in your Salesforce organization. We need to further modify the URL to pass the Amount as a variable that allows us to run the report from a link with any value of opportunity Amount. This modified URL becomes the following:/one/one.app#/sObject/00O0Y000006eJLvUAM/view?fv0=250000. This appended URL will be used in the following How to do it... section.

How to do it...

Carry out the following steps to edit an existing Home page to generate a filtered report link on a customized Home page using Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top-right corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:
  1. Type app builder in the Quick Find search box, as shown in the following screenshot:

  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Default customized Home page, as shown in the following screenshot:

  1. In the resulting Lightning App Builder page, drag and drop the Rich Text component from the standard Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:
  1. Click on the newly added Rich Text component and enter Opportunities with Amount >= 250,000 into the Rich Text properties section.
  2. This is shown in the following screenshot:

Note

The Rich Text properties section is located in the right-hand section of Lightning App Builder.

  1. Click the Link icon as shown in the following screenshot:
  1. Select URL for the Link Type, https:// for the Protocol, and enter  /one/one.app#/sObject/00O0Y000006dz0bUAA/view?fv0=250000 for the URL.
  2. This is shown in the following screenshot:
  1. Click on OK.
  2. The Lightning App Builder page should now be configured as shown in the following screenshot:
  1. Click on Save.
  2. Finally, click on Back.

How it works...

The customized Home page for the assigned users will appear with the filtered report link, as shown in the following screenshot:

Users can click the following link:

 /one/one.app#/sObject/00O0Y000006dz0bUAA/view?fv0=250000

They will then be presented with the filtered report, as shown in the following screenshot:

Note

Compare the Amount filter that is now showing greater or equal £250,000.00 to the filter of greater or equal £100,000 that was shown in step 15 of the Getting ready section.

See also

See the Cloning the standard Home page for a customized Lightning Experience recipe in this chapter.

 

Developing a Lightning component to display a custom logo on a customized Home page


Within the Salesforce CRM application, you can natively add rich-text-related sections to the Home page that can be configured to present messages and hyperlinks, and launch email applications.

Using Lightning App Builder, the Home page can be configured with the use of the standard Rich Text Lightning component, which supports formatted text, URLs, and email links as covered in other recipes within this chapter.

Organizations often have a requirement to brand the software applications that are in use by their employees or display graphic notifications, such as terms and conditions of system use, and this can be achieved in Salesforce CRM by displaying a custom image on the landing Home page.

Salesforce does not, however, provide a way of adding custom images to the Home page natively using a standard component within Lightning App Builder; therefore, we are going to develop a custom Lightning component to fulfill this requirement.

Getting ready

In this recipe, we are going to display a company logo on the Home page and we can either use an image file that we have created ourselves or use one obtained from an external source.

We will store the image file in the Salesforce CRM application as a resource so we can maintain a copy, and this will then be linked to enable the image to be referenced in our Lightning component.

Carry out the following steps to upload an image file into Salesforce CRM using Static Resources:

  1. Create or source a suitable image to be used as a company logo in the JPG, GIF, or PNG format and approximately 200 x 40 pixels, as shown in the following screenshot:
  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:
  1. Type static resources in the Quick Find search box, as shown in the following screenshot:

  1. Select the Static Resources option.
  2. Click on New, as shown in the following screenshot:
  1. Click on New.
  2. Enter the name of the Static Resource in the Name field. For this recipe, type WidgetsXYZlogo.
  3. Enter This is the company logo for WidgetsXYZ in the Description field.
  4. In the file uploader control, click on the Browse... button to select the image to upload from your computer. In this recipe, choose the image identified in step 1.
  5. Ignore the Cache Control picklist selection and leave it as default Private (Cache Control is only relevant to static resources used in https://www.force.com/, a Salesforce technology used for creating public web applications and web sites).
  6. The Static Resources setup screen appears as shown in the following screenshot:

  1. Click on Save.
  2. In the resulting Static Resource Detail page, click on View file, as shown in the following screenshot:
  1. In the resulting Static Resource Detail page, you can verify that the image is loaded by clicking on View file, which will load the file that has been uploaded. In our example, this is our company logo:

How to do it...

Carry out the following steps to develop a custom Lightning component and add it to an existing Home page within Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Developer Console option, as shown in the following screenshot:
  1. In the resulting Developer Console window, click on File.
  2. Click on New.
  3. Click on Lightning Component, as shown in the following screenshot:
  1. In the resulting New Lightning Bundle dialog, enter CompanyLogo for the Name.
  2. Enter This is a Company Logo Component for the Description.

 

  1. Click on Submit, as shown in the following screenshot:
  1. In the resulting Component page, paste the following code:
<aura:component implements="flexipage:availableForAllPageTypes" access="global"> 
   <img src="{!$Resource.WidgetsXYZlogo}"/> 
</aura:component> 
  1. Click on File.
  2. Click on Save, as shown in the following screenshot:
  1. Now, to add the component to an existing Home page using Lightning App Builder, click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:

  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Default customized Home page, as shown in the following screenshot:

  1. In the resulting Lightning App Builder page, drag and drop the CompanyLogo component from the custom Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:

Note

At the time of writing, custom Lightning Components only appear in the list of Lightning Components if you have set a custom Salesforce domain name for your organization. This is required for security reasons and is done by creating a My Domain subdomain, as detailed in the There's more... section of this recipe.

How it works...

The customized Home page for the assigned users will appear with the custom logo, as shown in the following screenshot:

 

There's more...

Custom Lightning Components are only available for use if you have set a custom Salesforce domain name for your organization. This is required for security reasons and is done by creating a My Domain subdomain. Carry out the following to set up a My Domain subdomain:

  1. Click on the Setup gear icon, as shown in the following screenshot:

Note

The Setup gear icon is located in the top right-hand corner of the main Home page.

  1. Click the Setup option, as shown in the following screenshot:
  1. Type my domain in the Quick Find search box.
  2. Click on My Domain, as shown in the following screenshot:

  1. Enter name.
  2. Click on Check Availability.
  3. Click on Register Domain, as shown in the following screenshot:

  1. Click on Deploy to Users.
  2. Click on OK to confirm, as shown in the following screenshot:

  1. In the resulting screen, the final step, My Domain Settings are displayed, as shown in the following screenshot:
About the Author
  • Paul Goodey

    Paul Goodey is the author of the book entitled Salesforce CRM Admin Cookbook, by Packt Publishing. He has over 25 years' experience developing web technology solutions for companies of all sizes across a variety of industries, and has been building solutions with Salesforce CRM since 2006. He has enjoyed a variety of roles while working with Salesforce CRM, having worked as a developer, business analyst, solutions architect, and system administrator to provide solutions for both in-house and consultancy-based end users. Based in the UK, near London, his professional qualifications include Salesforce Certified Administrator (ADM-201), and he is a keen and active member of Salesforce's administrator and developer online communities.

    Browse publications by this author
Latest Reviews (1 reviews total)
Book´s content very helpful and useful. Authors very professionals.
Salesforce CRM Admin Cookbook - Second Edition
Unlock this book and the full library FREE for 7 days
Start now