A talk for London's Calling 2018 entitled "Something Better Change". The title is a nod to The Stranglers a British punk band formed in the 70's, around the same time as The Clash, and still going today.     

Also given in part at Melbourne Salesforce User Group

Also given at World Tour Sydney 2018. 

Overview

Actions are one of the most powerful tools in your Salesforce declarative app-building toolbox. 

Actions were first introduced in Summer '13. 

Types

There are two main types of Actions - Global and Quick

Note that the Salesforce UI even gets these confused sometimes (see Enabling Guest Support in Communities - they say Quick Actions when they actually mean Global Actions) and the help documents are confusing also (see Create Quick Actions for the Salesforce Side Panel Publisher - no they mean Global Actions, and they've even called it Global Quick Actions - for Lightning for Outlook or Gmail.

Actions have had various names over the years, and these names are still visible in documentation and trailhead. In Spring '15 they became Quick Actions. 

Things you can do with Actions

TypeDescriptionAlso RequiresNotes
GlobalExternal users on Communities create Cases and LeadsExternal Community (now free)Can also be used to create a record of any Object Type

Logged in users on Communities create Cases for themselvesCustomer, Partner or Employee CommunityCan also be used to create a record of any Object Type

Create a record from the Global Actions1 button on the top right hand corner of any pageAn Action for each Record Type(Similar feature in Classic)

Create records from Lightning for Outlook, or Lightning for Gmail

Setup of Lightning for Outlook or Lightning for Gmail

Set up Email Application Publisher Layouts 

Both LFO and LFG can seem quite slow to use

Only allows Create Record Global Actions. 

QuickCreate a record related to the record currently viewedAn Action for each Record Type(Also in Classic)

Create a record with Prefilled data related to the record currently viewed

An Action for each Record Type

The Action added to the Lightning Actions section on the Page Layout so it appears on the top right corner of the page

Replacing the URL hack. See the Trailhead Module on Javascript button replacements. 

Update the record currently viewed

An Update and a Create Action

The Action added to the Lightning Actions section on the Page Layout so it appears on the top right corner of the page

Can also have pre-filled data

View selected fields as a subset of the fields on a page. A "modular" page layout. 

An Update Action - even if there are no updateable fields on the Action

A Related Record Component on the Lightning Page

(optional) Conditional Visibility for the Lightning Component

Super powerful and can be used for so many things! 

Eg only show Contract information on Opportunity after the Opp is closed won. 

Show details of the parent record on the child record page, since we have now lost our lovely hover views that were so useful in Classic.


Make fields required only if another field is entered

The required fields to NOT be required if they are on the regular page layouts

An Update Action - even if there are no updateable fields on the Action

A Related Record Component on the Lightning Page

Conditional Visibility for the Lightning Component based on the value of the first field - eg if SLA is entered, then the Related Record Component is shown and the required field is set. 

Well, sort of - it's not foolproof. It's only going to be required IF the user edits a field on that Action. But it's a start, and may be good for some instances, and may stop you from having to create unecessary Validation Rules that interfere with Proess Builder. 

Display Visual Indicators about the status of a record

A Field to calculate the Indicator

A Field to display the Icon based on the Indicator (can group multiple indicators into one field). 

An Update Action to display the Indicator fields only

A Related Record Component on the Lightning Page

(optional) Conditional Visibility for the Lightning Component

Also maybe create an optional field with smaller indicators for reports and list views. 

Launch a Flow

A screen-based Flow

A Flow Action

The Action added to the Lightning Actions section on the Page Layout so it appears on the top right corner of the page

Or

The Action added to the Lightning Page in the Flow Component

Can also be added to the Utility Bar. 

View a custom Visualforce page or Custom Component

The VF Page or the Component

A Flow Action

The Action added to the Lightning Actions section on the Page Layout so it appears on the top right corner of the page

Or

The Action added to the Lightning Page in the Visualforce Component

As this is code, I won't go into how to create the VF Page or Component. 

Update multiple records at at time

An Update Action

Add Action to the Search Layout > List View so it appears in the top right hand corner of the List View screen. 

Only for Cases, Leads and Custom Objects. No bulk updating Accounts, Contacts, Contracts or Opportunities. Oh how I would love to bulk update Opportunity Stages from the list view. 

COMING Summer '18! But I haven't had a chance to look at it yet. 


Salesforce Mobile App
All Actions that are on the Page Layout will appear in the Mobile app, including Flows in Spring '18

Send email with pre-defined field values 

A Send Email Action

Prredefined Field Values

Not really sure why you would do this, when you can use Email Templates, Quick Text, or Macros instead. A button is a bit of overkill. 

Override a standard button

OK, this is NOT an Action and it involves Code, but it is possible and pretty easy. Create a Flow, Create a Component following these steps and then use the Lightning Page Override on the standard buttons to override your buttons with a Flow. 

Note, it looks pretty ugly as it's not a modal. 


A guided step by step for users to complete a process. 

See Brian Kwong's excellent article on this. Using Dynamic Components and Flow To Guide Users - The Wizard News

Help Docs

Trailhead Modules

Advanced - using Code

When to use what

When to use an Action Button vs showing the Action on a Related Record Component with Conditional Visibility

Use Related Record Component if

Use a Button if

Remove the New Button on the Related List and add a Quick Action Button on the Record Page if

When to use Actions or Workflow or Process Builder

Yes, you can create a Process Builder that creates a record based on a field changing on the parent record. When should you do this rather than using an Action. 

Think of an Action as a user-intiitated Workflow. It can do everything that a Workflow or Process Builder can do, but it gives the user a button and a UI to initiate the Workflow. Much nicer than a checkbox on the page layout. 

When to use a Custom Component Override vs a Quick Action

Use a Quick Action if

Use a Custom Override if

Try Quick Actions first, and if after 6 to 8 months they are not working for you, then engage a developer. 

Things to Know

Tips

Some Example Actions

See Actions Examples for more details.

Actions with Related Record Component

The Related Record Component is a very interesting component. Something that Microsoft Dynamics CRM has had for a few years now and it's finally in Salesforce! And with Winter '18 they are fimally very useful! 

Different Page Layouts per App

You know how you can't have a different page layout for a different app, but you can have a different Lightning Record Page for each different App? Well I created a Lightning Record Page that does NOT include the Details component! What? I hear you say! I created an Update Action for each Record Type with all fields read only and conditionally displayed the Related Record component on the page, depending on the Record Type of the record. Yes, we still know which record we are on even though we are not displaying the Details Component. Hopefully when we can (hopefully sometime in the future) when we have some sort of conditional page layouts, we won't need to do this again. 

And because the Compact Layout had enough information in it I did not even need to add the preamble fields showing what the record was about - straight to the nitty gritty! 

NOTE: Do what I say, not what I do. Doing some of these things may result in you having to re-factor a lot of pages and Actions when new features come out in forthcoming releases. 

Admin Fields

Don't populate ALL your page layouts with System Fields and fields that you have created for Admin or reporting purposes - just create an Update Action named DisplAdmin and add the fields that are necessary to that. Then make that Related Record Component visible to Profile = System Administrator only using the great new feature released in Spring '18. Also, quite often you don't need to display these fields on the page layout at all - see Salesforce Inspector chrome extension. See Record Page for an example of this. 

Troubleshooting

Interesting Articles

Notes

  1. Prior to Spring '18 this button is named Create.