Lightning Experience Guide
Lightning Experience Guide
Lightning Experience Guide
@salesforcedocs
Last updated: January 5, 2016
© Copyright 2000–2015 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
User Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Tasks, Calendar, and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Feeds in Lightning Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Chapter 22: Sharing Visualforce Pages Between Classic and Lightning Experience . . 121
Detecting the User Experience Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Querying for Lightning Experience via SOQL and API Access . . . . . . . . . . . . . . . . . . . . . . . 123
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
WELCOME TO LIGHTNING EXPERIENCE
1
What Your Sales Reps Need Welcome to Lightning Experience
What sales reps love about mobile… …becomes what sales reps love about desktop
When we’re talking about Lightning Experience, we’re talking about pages in Salesforce optimized for sales use. We’re talking about
new features that help your sales reps focus on the right deals and the right activities, every time they log in. We’re talking about flexible,
interactive tools that sales reps can use to visualize data and work deals in flight.
But before we go any further, let’s talk about how Lightning Experience got its name, and why we built it in the first place.
A modern, productivity-boosting user The act of becoming lighter, like when you The method by which something is
experience designed to help sales reps close put down that swag-stuffed backpack you’re illuminated, like the soft glow of a lamp, by
deals lightning fast (see what I did there?) carrying at Dreamforce the light of which you read the release notes
So why the name “Lightning?” Well, think for a moment about actual lightning, the kind you see during a storm. Think about how fast
it strikes; if you blink, you might miss it. Think about how beautiful it is; lightning can be stunning to behold. Finally, think about how
unique each lightning bolt is; no two are the same.
2
What Your Sales Reps Need What About the Previous User Experience?
That’s a lot like Lightning Experience. It’s fast, it’s beautiful, and it’s unique to each sales rep. It’s a simpler user experience, designed to
help sales reps sell faster, with personalized alerts and an interactive assistant to help each sales rep focus on what’s important. All of
this drives improved productivity for your sales team.
Ultimately, we built Lightning Experience because of you, our customer. Lightning Experience is the result of everything we’ve learned
from you over the past years and releases. Lightning Experience is the killer sales app you can deliver to your sales reps.
Salesforce Classic refers to the Salesforce user experience immediately predating Lightning Experience. It’s the one with the row of tabs
across the top. If you haven’t customized your logo, you also see the seasonal Salesforce logo in the upper left corner when you’re looking
at Salesforce Classic.
So that’s Salesforce Classic, and again, it’s still here. It has to still be here, because not all features are available in Lightning Experience,
and besides, you might not be ready to move off Salesforce Classic yet. Depending on your company culture, change can take time, and
we get that, too. We’ll talk more about change management and migration in another module, since that’s an important topic all on its
own.
Back to Salesforce Classic and Lightning Experience. The first thing you need to know is how to tell when you’re in one or the other. If
you see a row of tabs across the top, you’re in Salesforce Classic. If you see a vertical navigation menu, you’re in Lightning Experience.
The vertical navigation menu on the left means you’re The row of tabs across the top means you’re in
in Lightning Experience Salesforce Classic
3
What Your Sales Reps Need What About the Previous User Experience?
It’s important that you get comfortable with identifying which one you’re in. If you decide to enable Lightning Experience, you need to
prepare for helping users with questions. As a Salesforce admin who has enabled Lightning Experience, one of the first things you’ll
need to identify on a troubleshooting call with a user is, are you in Lightning or in Classic?
We mentioned earlier that some features are not yet available in Lightning Experience, and right about now you’re probably wondering
exactly how that works. Let’s talk about that next.
4
CHAPTER 2 What Makes Lightning Experience So Special
In this chapter ... With over 25 new features and 50 redesigned pages, there are several key benefits to using Lightning
Experience. We won’t cover everything here, but for each area of the product, we’ll highlight some of
• Take a Tour of the neatest things.
Lightning Experience
To kick things off, let’s talk about some of the highlights:
• So How Do I Decide
if Lightning • New record layouts that focus on what you can do instead of what you can view
Experience is Right • Beautiful dashboards in a flexible layout with spanning columns that let you add more components
for Me? in a row
• Sleek report views that you can filter quickly, to slice and see the data that's most important to you
5
What Makes Lightning Experience So Special Take a Tour of Lightning Experience
Home
We’ve reimagined the way you start your day with a brand new, intelligent page. Now your sales reps can monitor their performance
to goal and get insights on their key accounts. Plus, we’ve added an Assistant, which is your users’ action list of things to do and places
to be.
• Start your day fast with a new, intelligent page
• Use the Performance Chart to monitor how close you are to crushing your numbers
• Get insights fast with Account Insights and social highlights
• Use the Assistant to identify exactly what you need to be doing today
• Focus your selling activities on your Top Deals
Opportunity Workspace
We’ve taken your sales process and put it into an action-first workspace, designed to help your sales reps work their deals faster and
smarter. You can customize coaching scripts for each step in the sales process, create records quickly with fewer clicks, and ultimately
close deals faster.
• Showcase key record details in the new highlights panel at the top of the page
• Use the handy composer to quickly log calls, create tasks, send emails, and more
• Get key coaching details with a customizable sales path to support your sales process
• See a wealth of related information on hover using quick view, without ever leaving the opportunity page
• Add related records—like contacts—in context with minimal clicks
6
What Makes Lightning Experience So Special Take a Tour of Lightning Experience
7
What Makes Lightning Experience So Special Take a Tour of Lightning Experience
List Views
Now your sales reps can visualize any list view graphically with a handy chart.
• Visualize your data in seconds with list view charts
• Use type-ahead search to find a favorite list view fast
• Automatically open your list views created in Salesforce Classic using Lightning Experience
8
What Makes Lightning Experience So Special Take a Tour of Lightning Experience
9
What Makes Lightning Experience So Special So How Do I Decide if Lightning Experience is Right for Me?
Other Highlights
• Navigate through pages more easily with the space-saving, collapsible left navigation menu
• Take better notes with the new Notes feature, which includes autosave, rich text capabilities, and the ability to relate a note to
multiple records
• Find your tasks on a new page for tasks, including the new Master-Detail view, which lets you see a single task and your entire list
of tasks side by side
• Find records faster with improved search, allowing you to view recent records and top results
10
What Makes Lightning Experience So Special So How Do I Decide if Lightning Experience is Right for Me?
So, let’s help you decide. Next, we’ll take you through the key differences between the two interfaces and help you figure out how to
make that decision.
11
CHAPTER 3 Understanding Lightning Experience and Salesforce
Classic
In this chapter ... Lightning Experience is a new, modern user interface for your sales reps to help them sell faster and
smarter. Lightning Experience features 25 new features and 50 redesigned pages, but not every feature
• Comparing Lightning is supported in Lightning Experience. So the experience you’ve come to know in Salesforce, called
Experience and Salesforce Classic, is still available for you, and the users you enable for Lightning Experience can switch
Salesforce Classic between the two at will.
• But What About
As your company’s trusted advisor for Salesforce, you need to help your company decide when to enable
Visualforce and
Lightning Experience. So, we’ve got to start getting you educated on Lightning Experience features
Apex?
versus Salesforce Classic.
• How to Assess the
Impact
12
Understanding Lightning Experience and Salesforce Classic Comparing Lightning Experience and Salesforce Classic
Note: This isn’t a comprehensive list of supported and unsupported features. For a more detailed list, please see the Salesforce
Help.
Salesforce Data
Feature Lightning Experience Salesforce Classic
Accounts, Contacts, Leads,
Opportunities, Price books, Products
Custom objects
Salesforce Files
Home
In Lightning Experience, Home is a new, intelligent page filled with insights, a slick performance chart, and a helpful assistant feature,
highlighting what’s most important each day.
Assistant
Account Insights
Customizable dashboards
Tasks
Items to Approve
Recent Records
Top Deals
13
Understanding Lightning Experience and Salesforce Classic Comparing Lightning Experience and Salesforce Classic
Events
Highlights panel
Activity Timeline
Related lists
Enhanced Notes
New Files
Twitter highlights
Collaborate
Person Accounts
Account Teams
14
Understanding Lightning Experience and Salesforce Classic Comparing Lightning Experience and Salesforce Classic
Opportunity Teams
Opportunity Splits
Leads
Create leads
Sales path
Composer *
Activity timeline
Enhanced Notes
New Files
Collaborate
15
Understanding Lightning Experience and Salesforce Classic Comparing Lightning Experience and Salesforce Classic
Opportunity Board
Sales reps can use the Opportunity Board, a visualization tool for opportunities, to review deals organized by each stage in the pipeline.
With drag-and-drop functionality, sales reps can move deals from one stage to another, and get personalized alerts on key deals in flight.
Intelligent Alerts
Sharing settings *
* Only list views marked as “Visible only to me” or “Visible to all users” are supported. Sharing with certain groups of users isn’t supported.
List Views
List Views have gotten an upgrade in Lightning Experience.
Resizable columns
Sharing settings *
* Only list views marked as “Visible only to me” or “Visible to all users” are supported. Sharing with certain groups of users isn’t supported.
Reports
Sales reps who use reports in Lightning Experience will find a greatly improved user interface, including the ability to easily create filters
and add enhanced charts. And Salesforce admins will find new features on the dashboard editor, including flexible layouts and spanning
columns. However, some report features aren’t yet available in Lightning Experience, including feeds and scheduled reports.
16
Understanding Lightning Experience and Salesforce Classic Comparing Lightning Experience and Salesforce Classic
Follow reports
Report notifications
Bucket fields
Joined reports
Report editing
* You can’t set up folder sharing in Lightning Experience; however, folders viewed in Lightning Experience that were created in Salesforce
Classic inherit all permissions assigned in Salesforce Classic.
Dashboards
Feature Lightning Experience Salesforce Classic
More than 3 columns supported
Flexible layout
Dynamic dashboards
Follow dashboards
Dashboard filters
* Dashboards that are already scheduled in Salesforce Classic will run as scheduled.
17
Understanding Lightning Experience and Salesforce Classic But What About Visualforce and Apex?
Forecasting
Territory Management
Salesforce Communities
Partner Portals
Service Cloud
Data.com
Work.com
18
CHAPTER 4 Enabling Lightning Experience
In this chapter ... At this point, you’ve evaluated the benefits of Lightning Experience and are ready to deploy to some or
all of your users. Next, we’ll walk you through the technical steps to enable Lightning Experience for
• Get Your Org Ready your users.
for Lightning
Experience This chapter doesn’t cover your overall rollout strategy. We’ll cover that in depth in Welcome to Your
Lightning Experience Rollout on page 67.
• Set Up Users for
Lightning Experience Let’s dive into the details.
• Turn Lightning
Experience On!
Does My Organization Qualify for Lightning
• Switching Between
Lightning Experience Experience?
and Salesforce
Classic These criteria prevent you from enabling Lightning Experience in your org:
• Person Accounts: Person Accounts aren’t supported in Lightning Experience. If your org uses Person
Accounts, you can’t enable Lightning Experience.
• Editions: Contact Manager Edition, Personal Edition, Database.com Edition, and Chatter.com Edition
aren’t supported for Lightning Experience. Customers on these editions can’t enable Lightning
Experience.
19
Enabling Lightning Experience Get Your Org Ready for Lightning Experience
New to permission sets? There’s a walkthrough for that! Walk Through It: Permission Sets
Worried about grumpy users? All users can switch back to Salesforce Classic if they’re having trouble in Lightning Experience.
20
Enabling Lightning Experience Turn Lightning Experience On!
If you’re in Professional Edition or Group Edition, Lightning Experience is “all or nothing” for you. Once you turn it on, it’s on for all of your
users.
If you’re in Enterprise Edition or above, consider these options:
• If you have users with standard profiles, consider moving them to custom profiles, because enabling Lightning Experience auto-enables
it for any standard profile users.
• Create a permission set with the Lightning Experience permission. Apply the permission set directly to the pilot users, then enable
Lightning Experience.
• Looking to mass enable? Adding the Lightning Experience user permission to the desired profiles is the fastest way to mass enable
Lightning Experience. If you’re a data loader ninja, you can save time by updating many profiles at once, but remember, with great
power comes great responsibility. Mistakes can inadvertently enable or disable other features.
Flip that switch, and your journey begins! The next time the users you’ve enabled log in, they automatically start enjoying Lightning
Experience.
Note: Remember that access by specific users can be controlled with permission sets and profiles, depending on your edition.
21
Enabling Lightning Experience Switching Between Lightning Experience and Salesforce
Classic
In Lightning Experience, click your profile picture in the upper right corner and select Switch to Salesforce Classic from the menu.
Tip: See that image there at the bottom? Click it to go right to the release notes!
Tip: Keep all members of a functional team on the same experience. If you have team members who often share links and work
closely together, include them all in the pilot. You can roll out Lightning Experience to a specific set of users using profiles or
permission sets.
22
WHAT'S NEW IN LIGHTNING EXPERIENCE
23
Navigation and Setup in Lightning Experience The Lightning Experience Navigation Menu
The navigation menu contains a set of standard objects predefined by Salesforce. The icons you see in the navigation menu are associated
with the object’s or app’s tab. You can view the menu item’s name by hovering over its icon.
You can expand and collapse the menu by clicking . The Home menu item ( ), which you may recognize if you use Salesforce1,
is the default home page for Lightning Experience. We’ll learn more about the Home page later.
You and your users can still get to custom apps and objects via the App Launcher, which we’ll look at next.
24
Navigation and Setup in Lightning Experience The App Launcher in Lightning Experience
Your users can find apps by searching for the app name or by using the App Launcher. You can click from any page to access it.
Apps show up as large tiles, and you can find custom objects under the Other Items tile.
All your custom apps, connected apps, and custom object tabs are available through the App Launcher. You and your users can personalize
the order of the apps on this page by dragging the tiles wherever you want.
Note: The apps that a user sees in the App Launcher varies depending on each app’s visibility settings and the user’s permissions.
When you click into an app, you see all the items associated with it, separated into two sections. The top of the list contains items that
are supported in Lightning Experience. The bottom of the list contains items that aren’t supported in Lightning Experience. Unsupported
items open in Salesforce Classic in a new browser window.
25
Navigation and Setup in Lightning Experience Meet the New and Improved Setup
As an administrator, you can use the App Launcher to set the default sort order and visibility for the apps in your organization. From
Setup, enter App Menu in the Quick Find box, then select App Menu.
This page shows all the organization’s apps. You can drag the apps into the order you want them and set each app’s visibility.
You can navigate to Setup from the top of any page in Lightning Experience by clicking > Setup Home.
26
Navigation and Setup in Lightning Experience Meet the New and Improved Setup
The Setup tree has been completely reorganized and recategorized. In Salesforce Classic, the Setup tree had a lot of specific node
categories, often with several nodes as nested subcategories. Sometimes there were many different ways to get to a destination. You
might have mastered the click paths after a while, but to new users, this structure was often an overwhelming hurdle. The new Setup
provides a streamlined interface for viewing and managing your administrative setup tasks.
27
Navigation and Setup in Lightning Experience Meet the New and Improved Setup
Users can access their personal settings at the top of any page by clicking their profile image, then clicking Settings.
We reorganized the platform tools into a more process-oriented organizational structure rather than being feature-oriented. Now you
can see pieces of the application life cycle broken up into subcategories: Apps, Objects and Fields, Process Automation, User Interface,
Custom Code, and Environments.
At the bottom of the tree, in the Settings section, you can view company information or configure security.
Note: As you’re getting familiar with the Setup area, it’s important to keep in mind that navigating through Setup is not about
memorizing click paths; it’s about understanding what you're looking for in order to get to your destination. Depending on your
users’ profile and permissions, one user might see a different set of items in Setup than another. As a System Administrator, however,
you see everything.
28
Navigation and Setup in Lightning Experience Meet the New and Improved Setup
Object Manager • All standard and custom objects now live in the Object Manager
• All objects now have a standard detail page
• You can filter the list of objects and also filter the contents of the
detail page to find things quickly
View Release Notes • Links to the most recent version of the release notes
• Great point of reference for new and existing features
Limitations
Advanced Setup Search isn’t available in Lightning Experience.
The Setup tree in Lightning Experience is limited to:
• Pages that support Lightning Experience features
• Administration pages that apply across your organization, such as user management, security, and company settings
Use Salesforce Classic to access administration pages for features that aren’t in Lightning Experience.
29
Navigation and Setup in Lightning Experience Object Manager
Object Manager
The Object Manager is a one-stop shop for managing all objects in your organization, both standard and custom. Access all objects and
their related functions—fields, validation rules, page layouts, and so on—from a single entry point.
To access the Object Manager, from Setup, enter Object Manager in the Quick Find box, then select Object Manager.
• To find an object, enter the first few characters of its label or name in the Find in page box.
• To edit a custom object, in the Actions column, select ... > Edit.
• To view more details about an object or to access its related functions, click the object label.
From the object detail page, you can view the object details and access all related functions, such as fields, validation rules, and page
layouts.
• To quickly jump to a function or control, use the links at the top of the page.
• To find a function or control by name, enter it in the Find in page box.
• If an ellipsis (...) appears in the Actions column for an item, click it to perform an action, such as edit or delete, on that item.
30
Navigation and Setup in Lightning Experience Global Search
Limitations
The Object Manager is limited to objects that support Lightning Experience features.
These object functions aren’t listed in the Object Manager. You can access them from elsewhere in Setup.
• Case Comment Triggers
• Feed Comment Triggers
• Feed Item Triggers
• Feed Item Layouts
• Group Layouts
• Group Triggers
• Group Member Triggers
• Group Record Triggers
• Publisher Layouts
• Topic Triggers
• Topic Assignment Triggers
Global Search
You’ve got so much data stored in Salesforce, sometimes the quickest way to your destination is through search. You can find the global
search box at the top of any page in Lightning Experience.
When you click in the global search bar, you see a drop-down of all your recent items. This used to be in the navigation menu, but is
now easily accessible from global search anywhere!
As you type, you see potential matches for your search.
31
Navigation and Setup in Lightning Experience Global Search
If none of these are what you’re looking for, press ENTER to see the full list of results. The result list returns your most frequently used
objects and the top results for those objects at the top of the list, and less frequently used objects at the bottom of the list.
If you click into global search from an object-specific view, like from an Account page, global search looks for Accounts based on your
search string. You can switch to Top Results for a federated search across your entire organization.
And, if you know the kind of record you’re looking for but aren’t on that object’s tab, you can search for that type of record by choosing
an item from the list below the search bar. The items in this list are ordered by how frequently you use them.
If you don’t see the object you’re looking for in the list but you’re positive it exists, don’t panic! Click More at the end of the list to see
all the objects. Currently the list is limited to Lightning Experience-supported objects.
Three Reasons You Might Not Find What You’re Looking for In Global Search
• It’s still getting added to the index. When you create or update a record, all the searchable content gets added to the index, which
can take about 15 minutes—or longer if a lot of edits have been made to the record.
• You’re trying to find a record with a field that isn’t searchable, or an object that isn’t searchable. Make sure the object and field you’re
searching for are stored in the index.
32
Navigation and Setup in Lightning Experience Lightning Experience Help Menu
• You don’t have access to the record. Global search only returns results you have permission to view.
When you click a video link ( ), a video player appears, allowing you to watch without leaving Salesforce.
Walkthrough links ( ) take you to the first step of the walkthrough in your organization. Help, developer guide, and PDF links open
in a new browser tab.
You can’t customize the items in the help menu. If you’ve created custom help links, those links still work from the “Help for this Page”
links in the framed Salesforce Classic pages. However, your custom help links don’t appear in the new Help menu.
33
CHAPTER 6 Opportunities, Leads, and Selling in Lightning
Experience
In this chapter ... We’ve taken your sales process and put it into an action-first workspace, designed to help your sales
reps work their deals faster and smarter. You can customize coaching scripts for each step in the sales
• Explore the process, create records quickly with fewer clicks, and ultimately close deals faster.
Opportunity
Workspace
• Opportunity Home
• Explore the Lead
Workspace
34
Opportunities, Leads, and Selling in Lightning Experience Explore the Opportunity Workspace
You don’t have to do anything to get opportunity workspace working for your users. However, as an administrator, you can enhance
your sales users’ workflow by customizing the sales path and the activity timeline to match their needs.
Sales Path
If you haven’t used sales paths before, like in Salesforce1, you may not be familiar with what they do. Sales paths guide your sales users
through each stage of your company’s sales process and help them stay focused on important sales tasks so they can close their deals
quickly.
35
Opportunities, Leads, and Selling in Lightning Experience Explore the Opportunity Workspace
From Setup, enter Sales Path in the Quick Find box, then select Sales Path. You can modify the default sales path or create
a new one.
You can enter sales stages, the key fields that sales reps must complete at each stage, and configure the Guidance for Success area to
deliver relevant information for each stage, such as links to chatter posts and files, tips, or policy notes.
Activity Timeline
With the activity timeline, your sales reps can keep a finger on the pulse of their deals. The timeline tracks meetings, tasks, calls, and
emails. Reps can see what they’ve done and what they still have left to do for each opportunity, lead, account, and contact.
36
Opportunities, Leads, and Selling in Lightning Experience Opportunity Home
Opportunity Home
The Opportunity home page in Lightning Experience looks a lot like other object home pages at first glance. You might not notice it at
first, but an awesome feature is waiting to be discovered there.
37
Opportunities, Leads, and Selling in Lightning Experience Explore the Lead Workspace
Here, your users can manage their opportunities through all phases of the pipeline, dragging and dropping opportunities from one
column to another. A yellow triangle on an opportunity card can indicate three types of alerts: overdue tasks, no open activities, or no
activity for 30 days. Users can click the triangle to create tasks and events right from the card. Items on the board vary based on which
list view is open.
Tip: The Opportunity Board can only show one record type at a time, so if your organization uses multiple record types, we
recommend that you create different list views for each record type.
38
Opportunities, Leads, and Selling in Lightning Experience Explore the Lead Workspace
To convert a lead, your users click the Converted stage in the sales path. Then, they either select an account or create a new one. They
can also create an opportunity.
39
CHAPTER 7 Explore More of Lightning Experience
In this chapter ... Opportunities and leads aren’t the only places we’ve made improvements. There are slick new features
to discover elsewhere, like the Home page, calendar, enhanced list views, and revamped home pages
• The Home Page for objects like acccounts, contacts, and cases.
• Object Home and List
Views
• Accounts, Contacts,
and Other Objects
• User Profile
• Tasks, Calendar, and
Events
• Feeds in Lightning
Experience
40
Explore More of Lightning Experience The Home Page
Assistant (2)
The Assistant shows your users things they need to address, including upcoming and overdue tasks, new leads, and activities related to
opportunities.
Items in the Assistant appear in the following order:
• Tasks that are overdue
• Tasks due today
41
Explore More of Lightning Experience Object Home and List Views
Note: In Salesforce Classic, the Home page has a Chatter feed. In Lightning Experience, that feed isn't there. Instead, Chatter (the
"Feed") is on the navigation menu, under the "Feed" icon. When you want to access Chatter on a record, go to the Collaborate
tab.
To populate the performance chart, Top Deals, and the Assistant, users must have:
Note: You can’t customize the layout of the Home page, add custom components, or move related lists.
42
Explore More of Lightning Experience Accounts, Contacts, and Other Objects
In the charts panel ( ), you can change the type of chart or create a new one.
The name of the recent records list that displays by default on the home page for standard and custom objects is different in Lightning
Experience. It’s called Recently Viewed. There’s another list view available for most standard objects that has the object type specified
in the name. For example, the list view for accounts is called Recently Viewed Accounts. These two list views, Recently Viewed and
Recently Viewed Object, show the same records. Neither list is deletable, filterable, or editable.
As an administrator, you can configure an object’s Recently Viewed search layout for your users. The search layout controls what all users
see when they land on that object’s home page. In Lightning Experience, from Setup, find the object in the Object Manager, then scroll
to its Search Layout related list and edit the Search Results search layout.
43
Explore More of Lightning Experience Accounts, Contacts, and Other Objects
The highlights panel is in the same place across all objects. But here there’s no Sales Path, and the Activity and Collaborate tabs are
together in the right hand column. Related lists are in their own tab in the main part of the page, alongside the Details tab.
Some objects have special components that appear on their pages, but the overall structure remains the same across all of them.
Accounts
Accounts have the Account Insights feature, which also appears on the Home page. Account Insights displays up to 10 unique news
articles per account, based on the account’s name and industry. Articles are selected based on recently viewed accounts and the accounts
that are associated with attendees on a user’s upcoming calendar events.
Accounts, contacts, and leads have the Twitter component, which lets you associate a Twitter profile to an account, contact, or lead. The
Twitter card shows the Twitter profile information and a count of how many "people in common" the Salesforce user has in common
with the linked Twitter user.
Cases
Cases look a little bit different than other records. Cases display a feed first rather than record details or related information, because
support agents mainly collaborate and work with activities in a feed. Details appear next to the feed. You don’t see Activities and
Collaboration because they display directly in the feed.
44
Explore More of Lightning Experience Accounts, Contacts, and Other Objects
If you turn off Case Feed, cases look like other records. Activities and collaboration appear, but the feed-first design disappears and adds
more clicks and context-switching to cases. You can use collaboration (Chatter) instead of feed, but collaboration doesn’t include useful
case feed publishers, such as email, log a call, or change status.
To fully benefit from new feed-first design on cases, recreate the standard case feed publishers. The standard publishers aren’t available,
but you can quickly recreate them as quick actions on the Case object. One benefit of recreating the publishers as quick actions is that
they appear on mobile devices, whereas standard case feed publishers don’t.
Custom Objects
Custom objects are supported in Lightning Experience, and custom object home pages contain the same standard elements as other
objects, such as details, related lists, highlights panel, activities and a feed (Collaborate).
45
Explore More of Lightning Experience User Profile
On this particular custom object, Expense Report, feed tracking hasn’t been enabled. So, the Collaborate tab, which you’d normally see
next to Activity, doesn’t appear.
User Profile
The user profile page has been streamlined in Lightning Experience. From here, you can follow a user, see their details, edit their
information (if you have permission) and see team members, files, groups, and other related information.
As with other objects, the pertinent details are in the main part of the page and the related lists are in the right-hand column. One unique
thing about the user profile page is that the Google map that you see by default on address fields for other objects is disabled for users.
46
Explore More of Lightning Experience Tasks, Calendar, and Events
• View a list of all your open tasks, showing the opportunities, accounts, and other records they’re related to. Details are right there
on the same page.
• Switch to views of tasks due today, completed tasks, and tasks you’ve delegated.
• To close or reopen a task, just check it off your list. No need to open the record, edit, and save.
• If you have 10 or more overdue tasks, they’re collapsed under Show More Overdue Tasks.
In the task list, you can customize the display and order of fields for individual tasks using task compact layouts. However, even if you
remove certain fields from a layout, they remain in the task list because they contain critical task information. For example, suppose that
you remove the status and due date fields from a compact layout. The task checkbox and the due date still appear on tasks in the list.
The remaining fields visible in the list reflect the fields you include in the compact layout.
Calendar
Enjoy a streamlined calendar look and feel when you view, create, and edit Salesforce events in Lightning Experience. The calendar
displays all events owned by a user, including events outside a user’s business hours.
Calendar week view:
47
Explore More of Lightning Experience Feeds in Lightning Experience
You can’t set or view event reminders; create or edit recurring events; or create, edit, accept, or decline meeting invites. However, suppose
that a Salesforce Classic user creates a series of recurring events. Lightning Experience users see the individual events on their calendars.
Similarly, Lightning Experience users can see individual events that they’ve been invited to by Salesforce Classic users.
48
Explore More of Lightning Experience Feeds in Lightning Experience
In Lightning Experience, users access their feeds from the navigation menu (1) and switch between the different feeds using the links
at the top (2) of the page.
In the opportunity workspace and on records, the feed displays on the Collaborate tab. Chatter actions are available in the composer.
49
CHAPTER 8 Reports and Dashboards in Lightning Experience
In this chapter ... We’ve redesigned reports and dashboards for Lightning Experience, making them more interactive, easy
to navigate and easy to edit. Dig a little deeper with us and see what reports and dashboards in Lightning
• Report and Experience can do!
Dashboard Home
Pages Here are several of the cool new features for reports and dashboards in Lightning Experience.
• Create Beautiful • Redesigned report and dashboard home pages
Dashboards Using a • New dashboard editor, featuring a dynamic, flexible layout that’s mobile-ready
New, Feature-Rich
• Interactive dashboards
Editor
• New report run page with interactive charts and filters
• Present and Share
Information in • Sales rep-focused enhancements, including auto-hidden details on matrix reports and the ability to
Interactive hide totals and subgroups on the report run page
Dashboards • Easy navigation via quick tabs and search
• Get More Information • Real-time data from your standard and custom objects
from Interactive
• Best practice Sales dashboards pre-installed for you
Charts and Filters on
the New Report Run • Easy migration from Salesforce Classic to Lightning Experience, with reports and dashboards
Page automatically viewable and inheriting all permissions and sharing already defined
• Reports and
Dashboards:
Compatibility
Between Lightning
Experience and
Salesforce Classic
50
Reports and Dashboards in Lightning Experience Report and Dashboard Home Pages
You can find a report or dashboard using filtered lists and folders (1). Filtered lists are the fastest way to find the report or dashboard
you’re looking for. For example, you can quickly find the Open Deals report you were reading last Friday in Recent Reports. Folders let
you group related reports or dashboards, so they’re easy to find again later.
Click a column heading (2) to sort by name, folder, creator, or whoever last modified a report or dashboard. Click again to reverse the
sort order.
You can build a new report or dashboard (3) right from this page. In Lightning Experience, you build reports just like you did in Salesforce
Classic using the report builder. On the Dashboards home page, clicking New Dashboard launches the brand new dashboard editor,
which we’ll look at in more depth next.
To run and view a report or open a dashboard, click its name (4).
51
Reports and Dashboards in Lightning Experience Present and Share Information in Interactive Dashboards
Drag the corners and sides of dashboard components to make them bigger or smaller (1). Components can span multiple columns and
rows, so you can show more fields on a graph without needing to scroll. Charts automatically resize to match component size. Click
to choose the report that provides data for the component, chart type, the report data drawn in the chart, chart title, or range.
You can arrange dashboard components more easily than ever by dragging them anywhere on the flexible grid layout (2). Not only that,
but you can create dashboards with more than three columns (3)! The foundation of each dashboard is a responsive grid, so you can
compare metrics side-by-side-by-side.
52
Reports and Dashboards in Lightning Experience Get More Information from Interactive Charts and Filters on
the New Report Run Page
The buttons and drop-down menu (1) provide one-click access to administrative tasks, such as refresh, edit, clone, save, and delete.
Have more questions about a metric or chart? Click View Report (2) to drill into the data. Hover over a chart (3) to learn more about it.
Get More Information from Interactive Charts and Filters on the New
Report Run Page
In Lightning Experience, new features on the report run page ensure that reports answer even your toughest questions.
53
Reports and Dashboards in Lightning Experience Get More Information from Interactive Charts and Filters on
the New Report Run Page
Get more from your report with the tools in the header (1).
•
— Show or hide a report chart.
•
— Add, remove, or change report filters. After applying a filter, the report automatically refreshes to show filtered data. You
no longer have to open the report builder to filter a report.
•
— Refresh your report to show the latest data.
•
— Show or hide subtotals, grand totals, and record counts from your report.
Clicking Edit launches the report builder. The action menu provides one-click access to saving, cloning, and deleting the report.
You can view key metrics at the top of every report (2). Report headers float on both the X and Y axes (3), so you always know what field
you’re reviewing without needing to scroll. And, we’ve redesigned the report format so groupings are easier to read (4).
54
Reports and Dashboards in Lightning Experience Get More Information from Interactive Charts and Filters on
the New Report Run Page
You can add, remove, and edit report filters (5) right from the report’s page. You no longer have to open the report builder to filter the
report you’re reading. If you want to see your sales pipeline for the apparel industry, edit the Industry filter accordingly and your
report refreshes.
You can also lock filters (6). If you want to share a report about your late-stage sales pipeline and don’t want to share early-stage data,
lock the Stage filter. Locked filters can’t be edited on the report run page. You lock and unlock filters in the report builder.
55
Reports and Dashboards in Lightning Experience Reports and Dashboards: Compatibility Between Lightning
Experience and Salesforce Classic
You may be wondering: “But can I customize it?” Yes, you can (7)! Change the chart type, title, and more from the chart options menu
( ).
56
Reports and Dashboards in Lightning Experience Reports and Dashboards: Compatibility Between Lightning
Experience and Salesforce Classic
Some Salesforce data and features aren’t available in the new user interface. And some features don’t have full parity with what’s available
in Salesforce Classic. For more information on the limitations for reports and dashboards, see the Salesforce Help.
57
HOW YOUR EXISTING CUSTOMIZATIONS AFFECT
LIGHTNING EXPERIENCE
58
Your Layouts Can Customize Lightning Experience Records Page Layouts in Lightning Experience
59
Your Layouts Can Customize Lightning Experience Records Compact Layouts in Lightning Experience
Related Lists
Related lists are included as Lightning components in Lightning Experience. The first eight related lists show related list buttons, the
first several records from the list, and a link to open the full list of records. For any additional related lists, only the list name appears
in the card. Users can still work with these related lists—simply click the related list name to access the full list. Here, users can see
records in the list and use related list buttons (such as New) or row-level record actions. Not all related lists are supported in Lightning
Experience. For example, the Object History related list isn’t supported.
Standard and Custom Buttons
Standard and custom buttons are treated as actions in Lightning Experience, just like in Salesforce1.
Important: Custom buttons that point to a URL or call JavaScript aren’t supported in Lightning Experience.
Visualforce Pages
Visualforce pages that you’ve added to the page layout appear under the Details tab. Only Visualforce pages with Available
for Salesforce mobile apps and Lightning Pages enabled display in Lightning Experience.
Visualforce pages that have been put into the Mobile Cards section as components don’t appear in Lightning Experience.
These page layout elements aren’t supported in Lightning Experience:
• Blank spaces
• Expanded lookups
• Mobile cards
Note: The Twitter card that you see on account, contact, and lead record pages in Lightning Experience isn’t the same as the
Twitter component available as a mobile card in the page layout editor. The Twitter card in Lightning Experience is a Lightning
component. You must have Social Accounts and Contacts enabled for it to appear.
• S-controls
• Sections
• Tags
Note: You can’t use the enhanced page layout editor to customize the layout of Lightning Experience record home pages. All
users see the same record layout in Lightning Experience, regardless of profile or record type.
60
Your Layouts Can Customize Lightning Experience Records Compact Layouts in Lightning Experience
Tip: Put the object’s Name field first to provide context for your users when they view a record.
You can create and edit compact layouts from the Compact Layouts related list on any object in the Object Manager in Lightning
Experience.
Changes you make to a compact layout are reflected in both Salesforce1 and Lightning Experience.
61
CHAPTER 10 Actions and Lightning Experience
In this chapter ... Actions enable users to do more in Salesforce, such as create or update records and log calls.
If you’ve already created and used actions in your organization, you’re familiar with how they work in
• Actions in Lightning
Experience
Salesforce Classic. If you’ve used our mobile apps, you’ve seen how they work in Salesforce1. In Lightning
Experience, instead of showing up in one place—like the Chatter publisher or the Salesforce1 action
• How Actions Are
bar—actions are split into different areas.
Ordered in Lightning
Experience Next, we go over where you can find actions, which actions are and aren’t supported, and how the
customizations you’ve made to actions on a page layout affect how they display in Lightning Experience.
62
Actions and Lightning Experience Actions in Lightning Experience
Note: The opportunity and leads workspaces have different structures, but actions appear in the same way on those pages.
63
Actions and Lightning Experience Actions in Lightning Experience
Note: Custom buttons that point to a URL or call JavaScript aren’t supported in Lightning Experience.
The Activity tab (2) contains Log A Call actions and Create a Record quick actions that point to the Event and Task objects. It also contains
the Email standard button.
The Collaborate tab (3) contains standard Chatter actions. By default, only the Post and Poll actions are supported, and if you have Groups,
the Announcement action. Some objects support other standard Chatter actions predefined by Salesforce.
Example: Let’s say you have these actions on your Contact page layout in the Salesforce1 and Lightning Experience Actions
section.
64
Actions and Lightning Experience Actions in Lightning Experience
You have quick actions (New Account, New Event, New Task), a productivity action (Call), standard buttons (Edit, Delete, Clone,
Send an Email), and Chatter actions (Poll, Post). Here’s how those actions display on a contact record page in Lightning Experience.
• The actions in the page-level action menu are a combination of the quick actions, productivity actions, and standard buttons
in the order that they’re listed on the page layout. Although they’re quick actions, New Event and New Task don’t show up
here.
• The Chatter actions from the front of the action list are on the Collaborate tab.
• The Activities-related actions—Email, New Event, New Task— display on the Activity tab.
65
Actions and Lightning Experience How Actions Are Ordered in Lightning Experience
66
ROLL OUT LIGHTNING EXPERIENCE
67
Welcome to Your Lightning Experience Rollout What It Takes to Go Live
Depending on the size of your organization, you might have a Project Manager assigned to the rollout, or you may be working with a
Change Management department at your company. Or you could be charged with organizing and executing the rollout from start to
finish. Regardless, your role in getting Lightning Experience live is critical, and it starts with learning everything you can about Lightning
Experience.
Let’s begin there.
Feature What it is
Accounts and Contacts Templates Reference-oriented template, with Account Insights, Activity
Timeline, and Twitter integration
Opportunity Board Visualization tool that lets you see your opportunities organized
by stage, drag opportunities between stages, and get alerts on
deals that need your attention
68
Welcome to Your Lightning Experience Rollout Getting Hands-On with Lightning Experience
Feature What it is
List Views Add charts and access any list view with a type-ahead search
Notes Improved notes feature with autosave, rich text, and the ability to
relate a note to multiple records, all searchable in Salesforce
Tasks Dedicated tasks tab with Master-Detail view, letting you see a
detailed view of a single task next to your full list of tasks
69
Welcome to Your Lightning Experience Rollout Educate Your Company About Lightning Experience
This step is critical. Whether you’ve already committed to rolling out Lightning Experience or you’re still evaluating the features, you
need executive support to ensure you’ve got resources and alignment to succeed. In addition, you need the right people from across
the company to join your project team, to ensure that every department has their needs met and increase user adoption once you go
live.
As you form your project team, keep in mind that depending on the size of your company, you might have people who fill multiple roles
(or “wear multiple hats”).
Find an executive sponsor and stakeholders, and involve them in your project early and often. Once you identify them, share with them
everything you’ve learned about Lightning Experience.
Make sure what you demo has data Make sure you’ve got sample records for all the features you demo.
Tell your user’s stories when you showcase the app Use your sales team’s real life examples as the stories to drive your
demo. For example, consider adding their photos to the user
profiles.
Test everything beforehand If you’re planning to show any customizations you’ve added, make
sure to test them first.
Practice makes perfect Run through your demo in advance to make sure you’re ready, and
to practice the flow of how you’ll demo features.
Record your demo! If you record your demo, you can easily share it with people who
couldn’t attend in person. The recording can also be a great training
asset later!
70
Welcome to Your Lightning Experience Rollout Perform a Gap Analysis
These types of questions mean that your users are thinking about how they can take their process and make it work in the new user
experience. This is good, but sometimes revisiting a process and improving it is a better next step. In other words, maybe “the way we’ve
always done it” isn’t the best path forward. As trusted advisor, you can help your users see that changing their process to adopt new
features can actually make them more productive.
So how do you do that? It’s easier said than done, but here are some ideas:
• Ask directly, “Can we change the way we do it?” The value proposition of new, improved functionality might be worth updating
existing process.
• Share the presentation we provided, which highlights some of the benefits.
• Walk key members of your sales teams and super users through the features, showing them how easy they are, how they work, and
why they’re helpful.
• Above all, work with your executive sponsor to drive the right behaviors from the top down.
After you demo Lightning Experience, it is time for existing customers to highlight any gaps. This is a critical step to help your company
understand what isn’t currently supported. The presentation we provided earlier features comparison charts, but as your company’s
trusted advisor, you should complete a full gap analysis to share with stakeholders.
If you’re brand new to Salesforce, you can skip this next step and head down to the end of the unit.
Note: This isn’t a comprehensive list of supported and unsupported features. For a more detailed list, please see the Salesforce
Help.
71
Welcome to Your Lightning Experience Rollout Present Your Findings
*Many apps from the AppExchange feature customizations, including custom objects, custom buttons, Visualforce pages. In preparation
for the Lightning Experience release, Salesforce partners are testing their apps and applying for Lightning Ready certification. If an app
is supported in Lightning Experience, a "Lightning Ready" sash appears on its AppExchange listing.
72
Welcome to Your Lightning Experience Rollout When the Show Is a Go
After you and your stakeholders have assessed the impact of each gap, you are ready to present your findings to the entire steering
committee and your executive sponsor. This meeting is where you showcase all the benefits of Lightning Experience one more time,
and highlight the gaps you’ve found. Ultimately, as the trusted advisor for Salesforce, come prepared to advise when you think your
company should move to Lightning Experience, the amount of time and resources required for the move, and your proposed launch
date.
73
CHAPTER 12 All Systems Go
In this chapter ... Planning and executing your Lightning Experience project should involve process, discipline, and yes,
a sense of fun! What’s the point of introducing game-changing new features if your users aren’t excited
• Where to Start about the rollout?
• Plan Your Rollout
In this unit, we’ll talk about how to schedule and plan your rollout effectively, but we’ll also share ideas
• Decide Who Gets for turning your launch into an awesome event at your company.
Lightning Experience
• Unleash the Power
of Super Users
• Create a Chatter
Group for the Rollout
Team
• Pick a Launch Date
• Create a Project
Schedule
• Define Measures for
Success
• Create a Marketing
and Communication
Strategy
• Create a Training
Plan
• Test Your
Customizations and
Iterate
• Ready to Start
74
All Systems Go Where to Start
Where to Start
Remember our Broadway musical analogy? You’re the Director, and your show just got greenlighted. So now what? Now it’s time to
get busy.
Start by listing everything you need to do before you go live, and then estimate the time and resources needed for those activities. Then
select a launch date, get your team, and go do all of it. Doesn’t that sound easy?
Doing all of that takes time and coordination. There are a number of methodologies for project management, too many for us to cover
here. Each one has different strategies for delivering projects. Pick whichever method you like. Ultimately, the important part isn’t the
way you do it; it’s what you do. That’s what we’ll talk about here.
In this chapter, we’ll be diving into the “Launch” step above. Let’s dive in.
Consider using permission sets Permission sets are a flexible way to roll out Lightning Experience
permissions to a particular sales team or group of users. Rather
than updating your profiles, you can create a single Lightning
Experience permission set and add users to it.
Keep teams together Put people who work closely together in the pilot together. You
want people who work together seeing the same screens. If people
collaborate often, they should have the same user experience,
including team leaders.
Be mindful of gaps If you have teams who are heavily impacted by gaps that you
identified in your gap analysis, avoid those teams in your pilot
75
All Systems Go Unleash the Power of Super Users
Learn more about enabling Lightning Experience for a specific set of users in Set Up Users for Lightning Experience on page 20.
Super users are often natural leaders, well-respected by their peers, and can be your evangelists in the field. And when it comes to rolling
out Lightning Experience, they can help make your project a success!
Work with your Executive Sponsor and stakeholders to identify a group of super users. Involve your super users in the rollout by giving
them sneak peeks at Lightning Experience and early opportunities to train on the new technology. Seek their feedback on your marketing
and communication plans, and consider asking them to train users, with a train-the-trainer approach.
76
All Systems Go Create a Chatter Group for the Rollout Team
Officially recognize their super user status through a special designation, like a custom icon on their Chatter profile photo, a button, or
a t-shirt—or all three! Make them moderators or managers of public Chatter groups for Lightning Experience. All of this helps validate
their role as leaders in your employee community and empowers them to help others.
One of the key files to share in your Chatter group is a project schedule. The project schedule is a living document that you’ll want to
keep updated and make accessible to your whole team, so it’s ideal to store it in the cloud in your team’s Chatter group.
77
All Systems Go Pick a Launch Date
Take this opportunity to review your existing Salesforce roadmap and clear any projects that might compete with your rollout. Work
with your executive sponsor to clear any roadblocks, such as competing non-Salesforce projects that require resources you need for
your rollout. If your rollout looks especially complex, you may need to advise your company to put other projects on hold until this
project is complete.
78
All Systems Go Define Measures for Success
One of the key items in phase three of the schedule is to identify measures for success. This is how you’ll ultimately know if your project
was successful, based on the criteria you define for what success looks like. Let’s talk about that next.
79
All Systems Go Create a Training Plan
• Create a topic in Chatter for all your communication updates to drive momentum and buzz
• Have a raffle with prizes, such as gift cards, a free day off, or lunch with an executive
• Host a launch party with cupcakes or cake
• Order swag and branded items to distribute on the day of your go-live
Include key communication milestones in your marketing strategy. For example, make sure that the entire company gets an official
communication on the day of the launch, as a Chatter post or email from your executive sponsor, VP of Sales, or CEO.
Here’s a sample communication plan:
1 day prior Email with reminders, instructions, and where to get help
Day of Go-Live Chatter post from company CEO & launch party
Training goals What is the specific outcome you want to achieve with this
training?
Training methods What will you use to conduct the training? What materials need
to be developed?
Training metrics How will you determine if the training was successful?
80
All Systems Go Test Your Customizations and Iterate
Consider using a train-the-trainer model with your super users to help you extend your reach. Rather than training all of your users
personally, you can train your super users and have them conduct user training. This train-the-trainer model also helps reinforce to users
that they should go to the super users with any questions post-launch.
Also consider follow-up training sessions or office hours after your launch to help reinforce the right behaviors and keep your users
current. If you have a support team, involve them in the training too, so they can be prepared for user questions.
Creates related records and updates existing records, with complex Process Builder and Visual Workflow
logic
As you work through updating these processes, work closely with your super users and users to test the replacement solutions you build.
Create test plans and conduct User Acceptance Testing (UAT) to ensure features work as expected. Get a sample test plan document in
the enablement pack.
Ready to Start
After you’ve created these plans, work with your project team, stakeholders, executive sponsor, and super users to execute them. And
once you’ve checked all the items off your list, it’s time to go live! In the next unit, you’ll enable Lightning Experience and find out how
you can boost your success post-launch.
81
CHAPTER 13 Go Live
In this chapter ... There comes a time in every successful project where you’ve planned everything, executed on all those
plans, and then the launch date arrives. This means it’s time to go big and go live with greatness. If this
• Engage with Super is your Broadway musical, then it’s opening night, and Salesforce admin, this is your time to shine!
Users
Depending on the project, the go-live step can be simple, complex, or somewhere in between. With
• Measure Results
Lightning Experience, we make it easy by giving you a single page where you can access all the steps
• Survey Your Users that need to be completed to move to Lightning Experience. Access this page in Setup by clicking
• Use Reports and Lightning Experience.
Dashboards in
This single page is your guide to enabling Lightning Experience. Keep in mind that there are other
Salesforce
features we recommend that you enable before turning on Lightning Experience. All the details are
• Deliver an Executive covered on the Setup page, and you can also review Get Your Org Ready for Lightning Experience on
Summary
page 20 for details.
• The Show Must Go
On
82
Go Live Engage with Super Users
But your engagement with super users doesn’t end with your go-live. That’s just the beginning. Consider setting up a monthly or quarterly
super user forum meeting where you gather all your super users together and talk about the roadmap, feedback, and overall adoption.
Create a private Chatter group with your super users to facilitate conversation year-round. And work with your super users to host weekly
office hours to answer user questions.
If you’re not yet convinced, here’s a short list of some of the ways these incredible team members put the “super” in super user:
• Play the role of Salesforce evangelist in the field
• Swarm on questions from users, in-person and on Chatter
• Help you boost adoption
• Train users
• Share valuable insight from the field
• Report bugs and issues
• Weigh in on the roadmap
83
Go Live Measure Results
Measure Results
When you were planning your rollout strategy, you worked with your executive sponsor and stakeholders to determine your success
metrics. Those metrics might have included things like:
• 20% reduction in opportunities with no follow-up tasks
• 15% increase in calls logged
• 5% increase in lead conversion
Or, the metrics might have been based on employee or customer satisfaction, or even a mixture of both. For either approach, you need
a baseline to work from to track changes in the numbers, so don’t forget to take a snapshot or conduct a survey before you go live.
Let’s discuss each approach in detail.
Focus Groups Bring together a group of customers or employees and ask a set
of specific questions.
Poll Create an informal Chatter poll to gather quick insights. Users can
also provide written feedback in the poll’s comment thread.
Using these methods, you can obtain metrics about overall satisfaction and any pain points. Following your go-live, after users are
comfortably working with the new experience, you can survey again and report on any changes in the metrics.
Not sure what to ask? Here are some ideas. We’re including questions that are open-ended and appropriate for focus groups, forums,
and shadowing, and also questions more appropriate for a written survey:
How do you use Salesforce? How long have you been using Salesforce?
What do you like best about Salesforce? Rate your overall productivity using Salesforce.
What would you change about Salesforce? Rate your overall satisfaction with Salesforce.
What is most frustrating about Salesforce? I have the tools I need to do my job.
What information do you need that you can’t find? It’s easy to work in Salesforce.
84
Go Live Use Reports and Dashboards in Salesforce
In addition to conducting surveys, cultivate an environment where feedback can flourish. Listening to your users boosts adoption. Here
are some ideas for how to encourage your users to give regular feedback:
Open Forum Host an open question and answer session, online via Chatter or
in-person, to get feedback and hear concerns.
When you’re receiving feedback, it’s important that your users feel heard, even though you can’t address all feedback. Consider starting
a “You Asked, We Listened” program where you address some employee feedback items every quarter.
Whether you’re doing a limited pilot or rolling out to your whole company at once, the goal is to go live, measure your results, and then
iterate. Then repeat.
85
Go Live Deliver an Executive Summary
Reporting Snapshots are a way to analyze trends over time, right in Salesforce. Search for “Reporting Snapshots” in the Salesforce Help
to learn more.
One of the benefits of using reports and dashboards is that they’re all built within Salesforce, which makes it easy to share with your
executive sponsor. Speaking of which…
86
Go Live The Show Must Go On
87
LIGHTNING EXPERIENCE DEVELOPMENT
88
User Interface Development Considerations Raising the Bar for Web App User Interfaces
Classic Visualforce
The Visualforce framework provides a robust set of tags that are resolved at the server-side and that work alongside standard or custom
controllers to make database and other operations simple to implement.
Let’s review some basics.
UI Generation
Server-side
Data and Business Logic
Apex standard or custom controller
Workflow
1. User requests a page
2. The server executes the page’s underlying code and sends the resulting HTML to the browser
3. The browser displays the HTML
4. When the user interacts with the page, return to step one.
Pros
• Tried and true model
• Easy to implement for greater productivity
• Naturally splits large applications into small, manageable pages
• Has built-in metadata integration
89
User Interface Development Considerations Visualforce as a JavaScript Application Container
Caveats
• Limited interactivity (aside from added JavaScript functionality)
• Higher latency
Visualforce is conceptually similar to other page-centric technologies like PHP, ASP, JSP, and Ruby on Rails. Salesforce’s rich metadata
infrastructure makes Visualforce a productive solution. The standard controller makes it easy to access objects directly and via relationships
without executing a single query. Other metadata-aware components are similarly plug-and-play: add markup to a page and you’re
done. These capabilities are alive and well on the platform, and they’re still suitable for many use cases.
90
User Interface Development Considerations Lightning Components
Lightning Components
Lightning components are part of the new Salesforce user interface framework for developing dynamic web applications for desktop
and mobile devices. They use JavaScript at the client-side and Apex at the server-side to provide the data and business logic.
Let’s take a look at an overview.
UI Generation
Client-side (JavaScript)
Data and Business Logic
Apex controller
Workflow
1. The user requests an application or a component
2. The application or component bundle is returned to the client
3. The browser loads the bundle
4. The JavaScript application generates the UI
5. When the user interacts with the page, the JavaScript application modifies the user interface as needed (return to previous step)
Pros
• Enables highly interactive and immersive user experiences
• Aligns with Salesforce user interface strategy
• Built on metadata from the foundation, providing an integrated developer experience
• The Developer Console supports Lightning components, so there’s an integrated developer experience
Caveats
• Higher learning curve compared to Visualforce
• Higher complexity than Visualforce—you’re building an application, not a page
• Since Lightning components are new, there are still some features that aren’t supported
• There are a limited number of out-of-the-box components
Job Recommendation
I’m Developing for the Salesforce1 Mobile Application We recommend Lightning components. Visualforce characteristics,
especially the page-centric orientation, can be a poor match for
mobile apps with limited, high-latency network connections and
91
User Interface Development Considerations Choosing the Right Tool for the Job
Job Recommendation
limited compute resources. Lightning components, by contrast,
was designed specifically to handle this context.
Both Visualforce and Lightning components use similar tag-based
markup. For example, Visualforce markup for an input field is
<apex:inputText> while for Lightning components it’s
<ui:inputText>.
So what’s the difference? Well, Visualforce processes markup tags
on the Salesforce server. Lightning components process markup
on the client. The advantage of processing on the client is that the
HTML block for the entire page isn’t passed back and forth between
the client and the server with every interaction.
With a few exceptions, Lightning components are better for
Salesforce1 development. Some cases call for Visualforce as a
JavaScript application. See the Lightning Components Developer’s
Guide for more information.
I’m Building a Page-Centric Experience with Limited Use Visualforce pages to ensure development velocity and
Client-Side Logic manageability.
I’m Building an Interactive Experience with JavaScript to Use Lightning components but refer to limitations documentation
Meet User Experience Requirements first.
I’m Committed to a JavaScript Framework Such as AngularJS Use a Visualforce page as a container for your third-party
or React framework, such as AngularJS or React, and your application.
I’m Enabling Non-Developers to Build Apps by Assembling Use Lightning App Builder and Lightning components for custom
Standard or Custom Components components. Use Visualforce if the required components aren’t
yet available.
I’m Building an Interactive Experience with JavaScript and I Use a Visualforce page as a container for your third-party
Need a Third-Party Framework framework, such as AngularJS or React, and your application.
You can also use a Lightning component as a container to host
your app built with the third-party framework, but this is a less
mature solution.
I’m Adding User Interface Elements For example, say you want to add a tab to a record home. This task
is a simple drag-and-drop in Lightning App Builder.
I’m Building a Community for Customers Use Community Builder to create a Lightning-based community
site leveraging Lightning components.
I’m Building a Community for Partners Continue using Visualforce in Salesforce Classic. Explore using
Lightning components with Lightning components for Visualforce.
I’m Exposing a Public-Facing Unauthenticated Website Continue using Visualforce. Lightning components don’t support
an anonymous (unauthenticated) user context yet.
I’m Rendering Pages as PDFs in My Application Use Visualforce. Lightning components don’t support rendering
as PDF output yet.
92
User Interface Development Considerations Choosing the Right Tool for Your Organization
Job Recommendation
I’m Adding to an Existing Project with Lots of Visualforce Continue to use Visualforce. Consider moving to Lightning
Pages components using Lightning components for Visualforce.
I’m Committed to Investing in the Latest Technology You’re right there with us! Dive in to Lightning components. Start
with the Lightning Components Trailhead module.
I’m Starting a Brand New Project Use Lightning components. If you’re not familiar with them, there’s
no better time than now to learn!
Role Recommendation
ISV Partner Start using Lightning components for new apps or new features
in existing apps. Package these units for subscriber use in both
Salesforce Classic and Lightning Experience.
Professional developers who are JavaScript gurus and experienced Continue using Visualforce with your preferred JavaScript
with Visualforce framework. Explore Lightning components and consider switching
down the line.
Citizen developers who use standard Visualforce components for Continue using Visualforce, but consider checking out Lightning
pages App Builder.
Point-and-click admins Use Lightning App Builder to create apps and customizations.
Buddy up with developers and partners to build custom Lightning
components.
93
User Interface Development Considerations Migrating to Lightning Components
We know that migrating to a new development framework is daunting. But we’re here for you. This trail is loaded with all the tips, tricks,
and gotchas that you need to successfully adopt Lightning Experience development.
94
CHAPTER 15 Visualforce and Lightning Experience
In this chapter ... Lightning Experience is a whole new world, and we hope you think it’s exciting. Behind the Lightning
Experience user interface is a new way of delivering the Salesforce application, one that brings significant
• What Works changes to the way Visualforce apps run. This release contains a beta version of Visualforce for Lightning
• What Works, But Experience that is production quality but has known limitations. For the most part, your Visualforce apps
Needs Updating and should “just work,” but there are some things you should know before you make the jump to Lightning
Testing Experience.
• What Doesn’t Work The technical details of how Lightning Experience is built and how it runs Visualforce apps are really
• That Look-and-Feel cool, and important for actual development work. When you’re ready for those details, the Visualforce
Thing & Lightning Experience module will show you the way. But here we’re going to stay at a high level, and
divide things up into what works and what doesn’t, what you’ll want to update, and other issues that
will help you plan your Lightning Experience migration development effort.
95
Visualforce and Lightning Experience What Works
What Works
The list of what parts of Visualforce work in Lightning Experience is pretty long. It’s very nearly as long as the entire Visualforce features
list. So before we get to the things that aren’t on the list, let’s think positive, and check off some of the many things you can count on.
First of all, the fundamental mechanisms of how Visualforce works remain the same. Whether your pages use the standard controller,
custom controllers, JavaScript remoting, or Remote Objects, your connection to Salesforce works the same.
Note: If you’re using JavaScript extensively, or if you’re using other APIs to access Salesforce, you might have some work to do.
We’ll get to that.
Second, Visualforce markup remains the same. There are a few tags and attributes that behave differently in Lightning Experience, and
a very few that we recommend against using or that just don’t work. But otherwise the way you write code for Visualforce pages and
components is unchanged.
Third, most of the ways you can use Visualforce to customize your organization work just fine in Lightning Experience—though as you
can no doubt imagine, with an all new user interface, these customizations have moved to different places.
Let’s dive just a bit into the specifics of these customizations. All of the following work just fine in Lightning Experience, simply moving
to a new location in the user interface.
• Creating custom tabs and apps with Visualforce pages.
• Creating custom buttons and links that lead to Visualforce pages.
• Creating custom actions that open with a Visualforce page.
• Overriding standard actions with Visualforce pages (with one exception that we’ll get to later).
• Creating flows that use Visualforce pages.
• Packaging Visualforce pages and components.
The changes in the user interface vary from minor to significant. Features customized with Visualforce move automatically when users
change between Lightning Experience and Salesforce Classic. You might need to give your users an initial orientation, but after that,
they’ll be happy as clams.
There are other features, such as Visualforce email templates, that use Visualforce code behind the scenes. These aren’t surfaced in the
user interface directly, and so they remain unchanged.
For a screenshot-heavy visual tour of where various features have moved to, see the Using Visualforce in Lightning Experience unit in
the Visualforce & Lightning Experience module.
96
Visualforce and Lightning Experience What Doesn’t Work
Similarly, code that assumes that it has access to the entire environment is in for a rude surprise. It still has access to the Visualforce part
of the document, but not the full Lightning Experience app. That will be fine for many apps, but for those that want to be totally in
charge, there’s going to be some work for you to do.
If your pages make use of iframes themselves, either with <apex:iframe> or static HTML, being embedded into another iframe
could cause some issues. In many cases “turtles all the way down” is fine. Just make sure you do extra testing here.
If your pages embed a Force.com Canvas app, and especially if you’ve used the Canvas APIs to integrate the app into Salesforce, allocate
time for thorough testing as well. Canvas apps use an iframe, and while correctly behaving code should just work, we all know how
common perfect code is in the real world.
Pages that use Remote Objects and JavaScript remoting work without requiring updates to authentication code. However, if your pages
use other Salesforce APIs you might need to adapt your authentication code to make the right cross-domain request, or otherwise adjust
to the new environment.
All of the above sounds both vague and hard to do but, in truth, the amount of code you’re likely to need to change is small. And again,
the details for developers are available in the Visualforce & Lightning Experience module.
97
Visualforce and Lightning Experience That Look-and-Feel Thing
And, coming down to the really minor issues, rendering Visualforce pages as PDFs works exactly as in Salesforce Classic, without any of
the Lightning Experience visual design. This is probably what you want anyway, but if you wanted to render pages into PDFs that include
the Lightning Experience design, that’s not possible today.
98
CHAPTER 16 Lightning Components in Lightning Experience
In this chapter ... By now you’ve read the word “Lightning” so many times it’s probably lost all meaning. To worsen the
storm, we’ve been talking about both “Lightning Experience” and “Lightning components.” Let’s clear
• Considerations for up the relationship between the two.
Use
Remember all that information about developing following either a page-centric or app-centric model?
Salesforce Classic uses a page-centric model, but Lightning Experience uses an app-centric model. It’s
made up of—you guessed it—components.
Starting to get the picture? Lightning components were designed with Lightning Experience in mind.
As the core Salesforce app shifts to the app-centric framework, we want you to shift along with us. We
want you to think about developing on the platform in a whole new way.
You might have developed some Lightning components in Salesforce Classic. You can still use the old
interface with Lightning components and all your existing component functionality transfers seamlessly
into Lightning Experience.
If you haven’t worked with Lightning components yet, don’t worry. There’s a Trailhead module, a quickstart
guide, and a full developer’s guide so that you can start developing in no time. Before you dive in to the
technical details, let’s take a second to review some basic advantages of Lightning components:
Out-of-the-Box Component Set
Salesforce provides a number of components to bootstrap your app development.
Performance
The component framework leverages a stateful client (using JavaScript) and a stateless server (using
Apex). This structure allows the client to call the server only when absolutely necessary. With fewer
calls to the server, your apps are more responsive and efficient.
Event-Driven Architecture
Events are key to the Lightning component framework. Components listen to application and
component events and respond accordingly.
Rapid Development
The simple markup and pre-made components mean that you can get applications out the door
faster than ever. Particularly if you’re comfortable with Visualforce markup, learning component
markup is a breeze.
Device-Aware and Cross-Browser Compatibility
A huge advantage of Lightning components is that you don’t have to worry about compatibility
across devices and browsers. The component framework handles this work for you.
99
Lightning Components in Lightning Experience Considerations for Use
100
CHAPTER 17 ISVs, Packaging, and AppExchange
In this chapter ... If you’re a Salesforce ISV partner, you probably have some concerns about how your app development
and release processes are affected by Lightning Experience. Will your existing apps still work? Will you
• ISV Tools in Lightning have to make major changes in your existing procedures? How about future app releases?
Experience
These are all valid concerns, but we have good news. At the moment, most parts of the ISV experience
• Packaging Your
are the same. There are a few speed bumps to look out for along the way. But overall, we hope that
Applications in
Lightning Experience opens more doors for innovative app development than it does close them.
Lightning Experience
• AppExchange and This unit provides a general overview of what ISVs should consider when using Lightning Experience.
Lightning Experience
101
ISVs, Packaging, and AppExchange ISV Tools in Lightning Experience
102
CHAPTER 18 Understanding Changes to Other Development Tools
In this chapter ... This last unit is a bit of a grab bag. We’ve already covered all of the “hard” stuff, so at this point you’re in
the home stretch. Can you feel it? That’s the feeling of a new badge, eager to leap onto your profile. Let’s
• Installed Packages in do this.
Lightning Experience
• The API and Apex in
Lightning Experience
• Authentication and
Security in Lightning
Experience
• Canvas for Lightning
Experience
• Salesforce1 for
Lightning Experience
• Mobile SDK for
Lightning Experience
103
Understanding Changes to Other Development Tools Installed Packages in Lightning Experience
104
Understanding Changes to Other Development Tools Mobile SDK for Lightning Experience
105
VISUALFORCE & LIGHTNING EXPERIENCE
106
Using Visualforce in Lightning Experience Where You Can Use Visualforce in Lightning Experience
Your Visualforce apps and custom tabs are all available from the App Launcher, which you reach by clicking in the header.
Clicking a custom app displays the tabs in that app, including your Visualforce pages.
This is pretty different from Salesforce Classic, and note that you need to add your Visualforce pages to tabs, and then add the tabs
to a custom app for them to be accessible in the App Launcher. Visualforce tabs that aren’t in apps can be found in Other Items.
107
Using Visualforce in Lightning Experience Where You Can Use Visualforce in Lightning Experience
108
Using Visualforce in Lightning Experience Where You Can Use Visualforce in Lightning Experience
Note: You must enable Available for Salesforce mobile apps and Lightning Pages for a
Visualforce page to make it available in Lightning App Builder.
Although their placement in the Lightning Experience user interface is quite different from Salesforce Classic, the process of adding
quick actions is much the same. Add them to the appropriate publisher area on the object’s page layout.
109
Using Visualforce in Lightning Experience Where You Can Use Visualforce in Lightning Experience
110
CHAPTER 20 Developing Visualforce Pages for Lightning
Experience
In this chapter ... The development process for creating Visualforce pages and apps for Lightning Experience is in some
ways considerably different from developing for Salesforce Classic. In others, you’ll find it’s just the same.
• Set Up Your Editor The main difference is how you view and test your pages during development.
• Viewing Visualforce
In this unit we’ll cover the details of getting your development environment set up, and then get into
Pages During
the details of the “right” way to test your pages while you’re in the process of building them. The good
Development
news is that the process you need to use to develop for Lightning Experience is the same you’ll use for
• Reviewing developing Salesforce1 pages as well.
Visualforce Pages in
Multiple
Environments
• Testing Your
Visualforce Pages
111
Developing Visualforce Pages for Lightning Experience Set Up Your Editor
So what’s a developer to do? You need to view your page from within the Lightning Experience app itself, so that it’s running inside the
Lightning Experience container. This means you’ll need to navigate to the page in Lightning Experience, and there’s a variety of ways
to do that.
The simplest way to get to a specific Visualforce page is to create a tab for it, and then navigate to that tab via Other Items in the App
Launcher. A more long-term approach would be to create an “In Development” app, and add your Visualforce tabs to it as you work on
them, and move or remove them as they roll out to production. Since the controls for doing this have moved around a bit, here are brief
instructions.
1. From Setup, enter Apps in the Quick Find box, then select Apps.
You should see the Apps Setup page.
2. Click New in the Apps section, and then create a custom app for your pages in development.
Consider restricting your app to only System Administrators, or a profile you’ve created for developers in your organization.
112
Developing Visualforce Pages for Lightning Experience Viewing Visualforce Pages During Development
You don’t need your users to see your pages before they’re added to their permanent place in the user interface.
3. From Setup, enter App Menu in the Quick Find box, then select App Menu.
You should see the App Menu Setup page.
5. From Setup, enter Tabs in the Quick Find box, then select Tabs.
You should see the Custom Tabs Setup page.
6. Click New in the Visualforce Tabs section, and then create a custom tab for the page currently in development.
Make the tab visible only to your development user profile, and add the tab only to your In Development app.
113
Developing Visualforce Pages for Lightning Experience Viewing Visualforce Pages During Development
7. Repeat the previous step for each page you want to add to your In Development app. For adding new pages in the future, this is
the only step required.
For all that that’s an easy way to see your pages while you’re working on them, it doesn’t really compare to simply typing the page name
into a URL. For a similarly low-overhead way to test your page in Lightning Experience, you can type the following into your JavaScript
console:
$A.get("e.force:navigateToURL").setParams({"url": "/apex/pageName"}).fire();
This JavaScript fires the Lightning Experience navigateToURL event, and is the equivalent of entering in the classic
/apex/PageName URL—you can even see that URL pattern in the code.
Note: You need to currently be in Lightning Experience for this technique to work. If you’re in Salesforce Classic, the JavaScript
code fails.
For something a little more convenient to use, add the following bookmarklet to your browser’s menu or toolbar. (We’ve wrapped this
code for readability.)
javascript:(function(){
var pageName = prompt('Visualforce page name:');
$A.get("e.force:navigateToURL").setParams(
{"url": "/apex/" + pageName}).fire();})();
114
Developing Visualforce Pages for Lightning Experience Reviewing Visualforce Pages in Multiple Environments
This bookmarklet prompts you for a page name, and then fires the event to navigate directly to it. Useful!
Once you’ve navigated to the page you’re working on, you can simply use your browser’s reload command to refresh the page as you
make changes.
Note: This is just an example setup, and you can use any modern browsers or mobile devices in yours, for both Salesforce Classic
and Lightning Experience. The key is to use two different browsers so you can access both Salesforce Classic and Lightning
Experience at once, and to use a real device to test with Salesforce1.
This probably sounds pretty elaborate, and it is a bit of a chore to set up initially, especially if you’re champing at the bit to get coding.
But keep in mind two things. First, once you’re set up, it’s done. And second, this workspace doesn’t just give you a great development
environment, it also provides you with the environments you need for formal testing of your pages. Because you wouldn’t dream of
putting your pages into production without formal testing, right?
115
Developing Visualforce Pages for Lightning Experience Testing Your Visualforce Pages
116
CHAPTER 21 Exploring the Visualforce App Container
In this chapter ... The largest difference between Visualforce in Lightning Experience and Visualforce in Salesforce Classic
is the environment it runs in. In Salesforce Classic, Visualforce “owns” the page, the request, the
• The Outer Lightning environment. Visualforce is the application container. But in Lightning Experience, Visualforce runs inside
Experience Container an iframe that’s wrapped inside the larger Lightning Experience container.
• The Visualforce
This change to the execution context has a number of effects on the way Visualforce pages can affect
iframe
the overall Salesforce application. We’ll talk about these changes in this unit, but save the full details of
• Impact of the New a few of them for their own units.
Container
• Visualforce Defaults Note: You remember that disclaimer you read at the beginning of this module? Well, this unit is
and Environment even more “under construction” than the rest. The reason is simple: The impact of the issues
Changes in Lightning described here is highly dependent on your code. We’ve worked really hard to make things “just
Experience work” for you, and in most cases little or nothing here will show on your radar. But we can’t
• <apex:page> anticipate every way that you’re using Visualforce. Today we’re outlining some general aspects of
showHeader and how Lightning Experience affects Visualforce. As we learn more from you about actual impact,
showSidebar we’ll expand our explanations to include more details about how to address specific issues.
Attributes Are Always
false
• The sforce.one
JavaScript Utility
Object
117
Exploring the Visualforce App Container The Outer Lightning Experience Container
Security Impact
Elements of security that might be affected include the following.
118
Exploring the Visualforce App Container Impact of the New Container
Scope Impact
When we talk about scope we’re mainly talking about the following kinds of things.
• DOM access and modification
• JavaScript scope, visibility, and access
• JavaScript global variables such as window.location
If this list sounds complicated or confusing, don’t worry, we can boil it down to something simple and easy to remember: Don’t touch
someone else’s stuff. Specifically, your JavaScript code (and stylesheet rules, for that matter) can affect elements—DOM nodes, JavaScript
variables, and so on—in your page’s browsing context, but it can’t access elements in any other browsing context, like the parent
Lightning Experience context. Don’t touch other contexts’ stuff!
Practically speaking, the most common code pattern where you’d want to do this kind of thing is to manipulate window.location
to navigate to another page. This is such a common thing to do, we’ve written up details on this specific issue...well, by the time you’re
done with this module, you’ll be sick of hearing about it, we promise.
One last note. If you’re an experienced JavaScript developer, you’re probably already thinking you know how to deal with “I don’t have
access to the parent browsing context” issues, by using contentWindow, window.parent, or the like. Please don’t. You’ll likely
run afoul of the same-origin policy (Visualforce and Lightning Experience are served from different domains, remember?). Even if you
don’t, you’re probably replacing obvious, blocking bugs with subtle, intermittent bugs. Where do you want to spend your time: Doing
things right, or the debugger?
Doing things right means calling APIs we’ve made available in your Visualforce pages, primarily for navigation. If you really need to affect
things across frame boundaries, use window.postMessage to send a message to receiving code in the other frame.
119
Exploring the Visualforce App Container Visualforce Defaults and Environment Changes in Lightning
Experience
Note: The standardStylesheets attribute of <apex:page>, which determines whether to include or suppress the
standard Salesforce Classic stylesheets, is unaffected by Lightning Experience. That is, it defaults to true in Lightning Experience,
but you’re able to change it.
120
CHAPTER 22 Sharing Visualforce Pages Between Classic and
Lightning Experience
In this chapter ... We recommend that, wherever possible, you create Visualforce pages that behave correctly whether
they run in Salesforce Classic or Lightning Experience. The benefits in terms of reduced complexity in
• Detecting the User your organization’s code and configuration are obvious. And there are a number of contexts, such as
Experience Context Visualforce overrides of standard actions, where you don’t have a choice. An action override always uses
• Querying for the same page, whether you’re running in Salesforce Classic, Lightning Experience, or Salesforce1.
Lightning Experience
It’s perfectly reasonable, though, to want slightly or significantly different behavior or styling that’s based
via SOQL and API
on the user experience context in which the page is running. In Winter ’16 the ability to detect the current
Access
user experience context is extremely limited, but it should cover the essentials.
121
Sharing Visualforce Pages Between Classic and Lightning Detecting the User Experience Context
Experience
You can use this utility function to make decisions in your JavaScript code. For example:
if( isLightningExperienceOrSalesforce1() ) {
// Do something for Lightning Experience
}
else {
// Use classic Visualforce
}
With some cleverness you can use this technique and add some device detection logic, and tease apart Lightning Experience and
Salesforce1. However, these techniques are likely to be fragile. Be sure to encapsulate them into your own utility functions, so that you
can update them easily if you run into issues.
122
Sharing Visualforce Pages Between Classic and Lightning Querying for Lightning Experience via SOQL and API Access
Experience
There are ways around this. For your UX context-specific stylesheets, you can add them to the page using JavaScript. For other page
elements, you can use JavaScript to hide or show them, depending on the context.
This is work, no two ways about it. We again want to encourage you to minimize the differences in behavior that your page provides
across user interface contexts.
We also have to say that while you can count on sforce.one being around for a while, detecting its presence to determine UX
context is not a best practice, but more the opposite. Again, isolate your checks for the user interface context into utility functions that
you can update once there is a supported way to determine it.
The result is a raw preference value, which you need to convert into something useable.
Here’s just about the simplest possible Visualforce page that runs the above SOQL query and displays the result on the page.
<apex:page>
<h1>userThemePreferenceResult (JSON)</h1>
<pre><span id="userThemePreferenceResult"/></pre>
</apex:page>
Querying for the user’s Lightning Experience preference directly is discouraged. The result tells you what the user’s current preference
setting is, not what user experience is actually on their screen. If the user is using an older browser, the preference value might not reflect
the user experience that’s actually being delivered.
123
CHAPTER 23 Managing Navigation
In this chapter ... App flow and navigation is in many ways the heart of application design. Visualforce provides a number
of ways to add navigation elements and to direct application flow. Lightning Experience adds its own
• Navigation in application flow, navigation elements, and mechanisms for affecting where users go as they use Salesforce.
Lightning Experience
The good news is that “classic” Visualforce navigation continues to work. The better news is that your
• Classic Visualforce
Visualforce pages can take advantage of the new Lightning Experience mechanisms, too.
Navigation
• Modern Visualforce
Navigation
• Navigation Gotchas,
and How to Fix Them
124
Managing Navigation Navigation in Lightning Experience
125
Managing Navigation Navigation Gotchas, and How to Fix Them
Important: The sforce.one object isn’t available in Salesforce Classic. Any code that uses it should test for the existence of
sforce.one first.
The sforce.one object provides the following functions. Reference the function using dotted notation from the sforce.one
object. For example: sforce.one.navigateToSObject(...).
Function Description
back([refresh]) Navigates to the previous state that’s saved in the sforce.one history. It’s equivalent
to clicking a browser’s Back button.
navigateToFeed(subjectId, Navigates to the feed of the specified type, scoped to the subjectId.
type)
navigateToFeedItemDetail( Navigates to the specific feed item, feedItemId, and any associated comments.
feedItemId)
navigateToList(listViewId Navigates to the list view that’s specified by the listViewId, which is the ID of the list
, listViewName, scope) view to be displayed.
createRecord(entityName[, Opens the page to create a new record for the specified entityName, for example,
recordTypeId]) “Account” or “MyObject__c”.
126
Managing Navigation Navigation Gotchas, and How to Fix Them
like Back buttons that account for redirects and the like. A number of features in Lightning Experience (and especially in Salesforce1)
depend on that stack containing all navigation events. It’s worth making sure you use it correctly.
Static URLs
Don’t use static URLs to Salesforce resources. That is, if you’re adding a link to edit a Contact record, don’t create the link by building a
string with a static pattern like link = '/' + accountId + '/e'. In some contexts this works, but in others it doesn’t. Instead,
try one of these approaches:
• In Visualforce markup, use {!URLFOR($Action.Contact.Edit, recordId)}
• In JavaScript, use navigateToSObject(recordId)
There are actions and functions for viewing, creating, editing, and so on. Use them, rather than URL strings.
127
CHAPTER 24 Understanding Important Visual Design
Considerations
In this chapter ... Visualforce pages look the same whether they are running in Salesforce Classic or Lightning Experience,
unless you rework them to adapt to the appropriate user interface context. Built-in Visualforce components
• Affecting the Styling that display user interface elements aren’t easily restyled to match the Lightning Experience look-and-feel.
of Standard
Components Specifically, the HTML that’s rendered by the built-in Visualforce components doesn’t change when the
page displays in Lightning Experience, and the Salesforce Classic stylesheets those components use is,
• Styling Strategies and
by default, loaded by the page. The effect is that pages that use <apex:inputField>,
Recommendations
<apex:outputField>, the <apex:pageBlock> components, and other coarse- and
• The Salesforce
fine-grained components that match the Salesforce Classic visual design, still match that visual design.
Lightning Design
You get a little slice of Salesforce Classic in the middle of your Lightning Experience.
System
• Adapting the It’s our general recommendation that—for now, for existing pages—you don’t try to adapt them to
Lightning Design match the visual design of Lightning Experience. There are two reasons for this. First, Lightning Experience
System for Standard is still evolving, and matching its styling yourself means you’re chasing a moving target. That’s work.
Components Second, it’s even more work if you don’t have the tools to do it. In the current release, the tools are mostly
not there. We have a number of ideas here and, Safe Harbor, we’re already hard at work at bringing them
to you in a future release. So if you can wait, that’s our recommendation.
Nevertheless, in some cases you’ll want some pages to match more closely with Lightning Experience
visuals. For new pages, or if you’re willing to do some work, there are some great tools for creating pages
that fit in perfectly with Lightning Experience.
128
Understanding Important Visual Design Considerations Affecting the Styling of Standard Components
<style type="text/css">
.asideText { font-style: italic; }
</style>
<apex:outputText styleClass="asideText"
value="This text is styled via a stylesheet class."/>
</apex:page>
You can then refer to any of the styles contained in the stylesheet, and reference them in Visualforce tag styleClass attributes, as
we did with the asideText style previously.
This is the recommended method for adding CSS style definitions to Visualforce pages, because it shares the stylesheet between pages,
and minimizes the markup you need to add to each page.
129
Understanding Important Visual Design Considerations Styling Strategies and Recommendations
</apex:page>
See the Sharing Visualforce Pages Between Classic and Lightning Experience unit for important details about detecting the user interface
context you’re in.
OK, these are tools. Let’s look at a few techniques for using them next.
130
Understanding Important Visual Design Considerations The Salesforce Lightning Design System
Note: The Lightning Design System is available today as a public beta. Although the code is actually better than beta quality, it’s
still evolving and there’s the possibility of incompatible changes that would require you to revise your markup. You can expect
this to settle down in another release, and for now you should take that into consideration. (Safe Harbor, but you already knew
that, right?)
The first thing to know is that the Lightning Design System assumes a new markup structure and styling classes. For this reason it’s best
used with new pages and apps. It’s built around the capabilities of modern browsers, and takes advantage of the latest best practices
for markup and styling. As much as we all love it, Visualforce has been around a while. Between the HTML it generates and static code
in customer pages, most organizations will find it challenging to apply the Lightning Design System to existing pages.
The Lightning Design System module is focused on creating new pages and apps, and scoring that badge is the best way to learn about
it. After finishing that module you’ll have an understanding of both how to use Lightning Design System and how to plan development
around it.
Note: Remember when we said use caution with Lightning Design System? This goes double for using it with built-in Visualforce
components. For now this is an unsupported use of Lightning Design System.
The process works something like this.
1. Make a copy of the page you want to try converting to the Lightning Design System. Safety first. Work on a copy, not the real page.
2. Add the static resource for the Lightning Design System to your organization, if you haven’t already.
3. Add the Lightning Design System stylesheet to the page using the techniques you’ve learned from this unit.
4. Add the Lightning Design System wrapper <div> to the page to surround the user interface.
5. Work your way through the page’s user interface elements, and add the appropriate Lightning Design System style classes to each
element.
131
Understanding Important Visual Design Considerations Adapting the Lightning Design System for Standard
Components
6. Augment the markup around each element as needed, so that the markup matches the recommended Lightning Design System
markup for the user interface element as much as possible.
Written like this, it doesn’t sound very hard at all! And indeed, the initial preparation steps are quite easy. It’s those last two steps, the
ones that iterate through every Visualforce and HTML tag on the page, that can turn out to be challenging.
Sometimes it’s easy. For example, adding Lightning Design System classes to an <apex:commandButton> can be straightforward:
But if the button has complex styling or complex behavior, you might not find it so easy. Lightning Design System buttons have 13 major
variations at this writing, and a number of additional minor variations. Not all of those map to possibilities available with
<apex:commandButton>. With others, such as the buttons with icons, it’s not clear how you add the additional markup that
Lightning Design System requires to the comparatively simple <apex:commandButton>.
The key is to work with the fine-grained components, and build up your pages from these small building blocks. You’ll never be able to
style a <apex:pageBlockTable> with Lightning Design System directly, but if you apply Lightning Design System classes to the
lower-level elements , you can get it to look reasonably like Lightning Experience. Here’s a brief example of a table-based page.
<apex:page standardController="Opportunity" recordSetVar="opportunities"
docType="html-5.0">
<apex:stylesheet value="{!URLFOR($Resource.SLDS,
'styles/salesforce-lightning-design-system-vf.css')}"/>
<div class="slds">
<apex:form styleClass="slds-form-element">
<apex:pageBlock mode="maindetail" >
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"
styleClass="slds-button slds-button--neutral"/>
</apex:pageBlockButtons>
<apex:column styleClass="slds-form-element__label"
headerClass="slds-form-element__label" headerValue="Name">
<apex:outputLabel value="{!opp.name}"
styleClass="slds-form-element__control slds-form-element__static"/>
</apex:column>
<apex:column styleClass="slds-form-element__label"
headerClass="slds-truncate" headerValue="Stage">
<apex:inputField value="{!opp.stageName}"
styleClass="slds-form-element__control slds-select"/>
</apex:column>
<apex:column styleClass="slds-form-element__label"
headerClass="slds-truncate" headerValue="Close Date">
<apex:inputField value="{!opp.closeDate}" type="date"
styleClass="slds-input"/>
</apex:column>
132
Understanding Important Visual Design Considerations Adapting the Lightning Design System for Standard
Components
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</div>
</apex:page>
You’ll have even better success if you can work with the unstyled table component, <apex:dataTable>, or even by building your
own table markup explicitly using <apex:repeat>.
Adapting pages to use the Lightning Design System gets easier the more you do it. Earn your Lightning Design System badge, and get
familiar with the Lightning Design System components. Then start with simple pages, and work your way up!
133
CHAPTER 25 Knowing Which Features to Avoid in Lightning
Experience
In this chapter ... There are a limited number of Visualforce components that we recommend you avoid on pages used
in Lightning Experience. Additionally, a few features of Visualforce behave differently when used in
• Lightning Experience Lightning Experience. Finally, there are a few places in Lightning Experience where you can’t use
Header and Visualforce pages or apps, or where they might not function as expected.
Navigation Menu
Can’t Be Suppressed Lightning Experience is still evolving and growing, and—Safe Harbor alert!—we hope to shrink this list
as time goes on.
• Salesforce Classic
Header and Sidebar
are Always
Suppressed
• Page Title Can’t Be
Set
• <apex:relatedList>
and Blacklisted
Related Lists
• Avoid <apex:iframe>
• No, Really, Don’t Set
window.location
Directly
• sforce.one Is No
Longer
Salesforce1-Only
• Changes With Action
Overrides
• Home Page Doesn’t
Support Visualforce
• Visualforce Tabs and
Apps Can’t Be Added
to Lightning
Experience
Navigation Menu
134
Knowing Which Features to Avoid in Lightning Experience Lightning Experience Header and Navigation Menu Can’t Be
Suppressed
Note: The standardStylesheets attribute of <apex:page>, which determines whether to include or suppress the
standard Salesforce Classic stylesheets, is unaffected by Lightning Experience. That is, it defaults to true in Lightning Experience,
but you’re able to change it.
Avoid <apex:iframe>
While it’s not impossible to use <apex:iframe> on a Visualforce page in Lightning Experience, we recommend avoiding it.
135
Knowing Which Features to Avoid in Lightning Experience No, Really, Don’t Set window.location Directly
Visualforce pages are wrapped in their own iframe when displayed in Lightning Experience. As discussed at length in Exploring the
Visualforce App Container, this has a number significant implications for how the page behaves. Adding an additional level to the iframe
stack increases the complexity of the environment.
If you really understand iframes and how they affect the DOM and JavaScript, you can manage this complexity. But unless you’ve already
been working with nested iframes, it’s more likely that you’ll have difficult to debug problems. For this reason, we suggest you avoid
this tag on pages that are used in Lightning Experience.
136
Knowing Which Features to Avoid in Lightning Experience Home Page Doesn’t Support Visualforce
This table lists the standard actions you can override for an object in Setup, and the action that’s overridden in the three different user
experiences.
Note: “n/a” doesn’t mean you can’t access the standard behavior, and it doesn’t mean you can’t override the standard behavior.
It means you can’t access the override. It’s the override’s functionality that’s not available.
137
INDEX
A H
Account Insights 20, 41 Help menu 33
Accounts 6, 43 Highlights panel 60
Actions Home 6, 41
in Lightning Experience 63, 66
Activity Timeline 35 I
Apex 18 Is Lightning Experience right for me? 10
App Launcher 24
App Menu 24 L
Assessing the impact of Lightning Experience 18 Lead conversion 20
Assistant 41 Lead Workspace 38
Lightning Experience 95–98, 106–107, 111–112, 115–118, 120–
C 126, 128–131, 134–137
Calendar 46 Lightning Experience Developer Edition 69
Case feed 43 Lightning Experience features chart 68
Cases 43 Lightning Experience overview 1–2, 5
Chatter 48 Lightning Setup page 21
Compact layouts 58, 60 Limitations 30, 42
Comparing the two interfaces 3, 10, 13 List views 37, 42
Considerations 19 List Views 6
Contacts 6, 43
Custom help links 33 N
Custom objects 43 Navigation menu 23
Customization
programmatic 18 O
Customizing 24, 60 Object home 35, 38, 42
Customizing Lightning Experience 58 Object Manager 30
Opportunity Board 6, 37
D Opportunity home 37
Duplicate management 20 Opportunity Workspace 6, 35
Other enhancements 40
E
Enabling by edition 20 P
Enabling Lightning Experience 19, 21 Page layouts
Enabling users 20 how they work in Lightning Experience 59
Enhanced Notes 20 Performance chart 41
Events 46 Permission sets 20
Person Accounts 19
F Piloting Lightning Experience to your users 20
Feed 48
R
G Recommended features 20
Get your organization ready 20 Reports and Dashboards
Global search 31 dashboard components 52
dashboard editor 51
138
Index
139