1 of 15

UPDATE 6/15/18:

This App is being retired as there’s a better solution in Salesforce.

The free Lightning Usage App was added to Lightning with Summer ‘18. Key benefits:

  1. No install required
  2. No configuration required
  3. No conflicts with other apps
  4. Additionall tracks top lightning page views and Mobile app usage

Please use that app instead moving forward.

https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_lightning_usage.htm

2 of 15

Lightning Adoption Tracker Dashboard App Install Guide

jkucera@salesforce.com

3 of 15

Installation: Step 1 - Configure My Domains

4 of 15

Installation: Step 2 - Install the App & activate it

  • Install the app (if you haven’t already) and grant access to all users if you want others besides Admins to view the Dashboard and reports
    • NOTE: if you didn’t have My Domains enabled, see the appendix slide for the next steps
  • In Lightning, switch to the Lightning Adoption Tracker app
  • Click on the Lightning Adoption Tracker Setup tab, and click on the toggle to activate the app
    • NOTE: After initial activation, the app will start immediately, updating 2 User custom fields used for the reports

5 of 15

Installation: Step 3a - Edit Field Mappings for Reporting Snapshot

  1. Go to Setup, quick find on Reporting Snapshots
  2. Click on the Name of the “Using Lightning, All Users” snapshot
  3. Scroll down to “Field Mappings” and click Edit
  4. Update the 3 picklists to map the report fields to the custom object fields and save:
    • Can Use Lightning
    • Profile
    • Using Lightning

What is this used for?

The dashboard has a trend report tracking who is using Lightning each day. This Reporting Snapshot is needed to capture those changes over time and power that trend chart.

1

2

3

4

6 of 15

Installation: Step 3b - Schedule the Reporting Snapshot

  • Scroll down to “Schedule Reporting Snapshot” and click Edit
  • Unselect “Email Reporting Snapshot”, Set the frequency to Daily and Every Day, change the end date far into the future, and select a time such as 10pm in the evening for the snapshot to be taken

What is this used for?

The dashboard has a trend report tracking who is using Lightning each day. This Reporting Snapshot is needed to capture those changes over time and power that trend chart.

1

2

7 of 15

Installation: Step 4 - Find the Dashboard & Refresh

After a few minutes, your dashboard should be ready to be refreshed!

  • Type “Lightning Adoption Dashboard” into global search
  • Click “Dashboards” in the search results filters
  • Click on “Lightning Adoption Dashboard - Lightning” to access the Lightning optimized version of the dashboard.
  • Click Refresh on the Dashboard to see the latest!

8 of 15

How does the app work?

  • Users with the Lightning Enabled user permission can switch into Lightning & back to classic. This is not reportable, so the app grabs the True/False value and updates a custom field on User
    • “Can Use Lightning”: this custom field stores whether the user has the user permission enabled
  • Users that switch into Lightning have a user preference set to True. If they switch back to Classic it’s set to false. This is also not reportable, so the app grabs the True/False value and updates a second custom field on User
    • “Using Lightning”: this custom field stores the user preference value
  • A batch apex job runs hourly and:
    • Queries PermissionSetAssignment for any changes to the User perm
    • Queries the User record for changes to the user permission
    • Updates users if there’s a change to either one

9 of 15

How does the app work? (cont)

  • Several Reports come preinstalled which use those custom fields to generate adoption insights
  • A Report Snapshot is used to take a daily copy of the count of users in each bucket by profile every day
  • Those reports are used to power the charts on the Lightning Adoption Dashboard
    • NOTE: if you’re in Lightning, make sure to use the “- Lightning” version of the Dashboard!

10 of 15

Troubleshooting - “The app isn’t updating / showing the right results”

Please try the below first, and then email jkucera@salesforce.com

  1. Has it been at least an hour since a user was enabled for Lightning or Switched?
    1. The app only runs hourly, so more frequent changes won’t be reflected
  2. Did you recently refresh the dashboard?
    • The dashboard needs to be refreshed after the app updates the custom fields on User
  3. Can you manually edit a user who doesn’t appear to have the right information?
    • Some customers have validation rules or triggers which can fail updates to the User record. Manually editing is one way to test these, but doesn’t catch all trigger errors.
  4. Can the user see the “Switch to Lightning/Classic” in the profile menu?
    • If not, then the user permission for Lightning is not enabled on their profile or an applied permset and “Can Use Lightning” should be false.
    • You can add the user permission
  5. Do you see the Scheduled Apex job for the app?
    • If not, then the app isn’t enabled. Visit the setup page (see instructions on previous slides here)
  6. Do you see the Apex Jobs history with success for the batch apex job?
    • Some customers have too many open batch apex queued jobs, which prevent the updates from occurring
  7. Do all Apex Jobs for this app have success?
  8. Is the Trend report the only issue?
    • See the revised 3a steps in this document. Field mapping steps were omitted in previous versions of the guide

11 of 15

Common Apex Job Errors & How to Address Them

Error Message

What does the error mean

What to Try Next

First error: Update failed. First exception on row 0 with id <user id>; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id:

Usually it means a non-admin somehow activated the app. The app is failing as that non-admin can’t make updates to other users.

Go to the App’s setup page, switch the app off, and switch it back on.

caused by: System.DmlException: Update failed. First exception on row 0 with id 00570000003Kn5vAAC; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION [Validation Rule Error Message]

There’s a validation rule on User which is failing updates to at least one user

  1. Go to the UserId shown and try to manually edit to resolve the error (may need to repeat this)
  2. Or...Change the Validation rule so that it does not prevent updates.

caused by: System.AsyncException: Future method cannot be called from a future or batch method: [ApexClassName].[ApexMethodName]

You have other apps / code that conflict with this app.

Determine the owner of the code from the method or class name in the error. Then have them change their @future or batch apex code to NOT execute if system.isFuture() == true

caused by: System.DmlException: Update failed. First exception on row 17 with id 005U0000004TSGBIA4; first error: DEPENDENCY_EXISTS, Cannot complete this operation. This user is being used by email alerts. : Email Alert : []

Other code is doing something with a user.

This should resolve on it’s own with the next run.

Failed to process batch for class '<unknown>' for job id '7074100004BBRdF'

Salesforce had an error

This should resolve on it’s own. If not resolved in a day or two, file a case.

12 of 15

FAQ

  • Do I need Lightning Enabled to set up the app?
    • It’s strongly advised, but there’s a visualforce tab that also allows setting up the app in Classic (see the appendix)
  • Do I need My Domains enabled to set up the app?
    • It’s strongly advised as you need this for any other custom Lightning Components, but you can use the VF page if you can’t enable My Domains right now
  • Can I make custom reports or change the Dashboard?
    • Yes - once installed, the app author can’t ever change the dashboard in your Salesforce account but you can. You can also clone the reports that power the dashboard to create new reports catered to your business needs
  • Who can I contact with Questions?
    • jkucera@salesforce.com

13 of 15

Lightning Adoption Tracker Dashboard

14 of 15

Installation: Step 2 if My Domains is not Enabled

  • If you installed the app before My Domains was enabled for your Salesforce Account, you’ll need to use a different page to activate the app as the custom Lightning tab won’t show up.
  • From Lightning*:
    • Click on the App Launcher
    • Under All Items, click “Lightning Adoption Tracker Setup - Classic”
  • Click the toggle to enable the app
  • Recommended: After initial activation, click the Run Now button to immediately start a batch job which updates a couple of custom fields

*If you are still in classic, you can click the [+] to find this setup tab as well.

15 of 15

Installation: Step 2.1 After My Domains is Enabled

  • If Lightning Component tabs are installed when My Domains is not enabled, then the tab is set to Hidden
  • In order to see that tab later, you can change the tab settings in Profiles in Setup:
    • In Find Settings, look for LIghtning Setup
    • Change the tab visibility to Default On