Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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. 

...

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

...

  • It's a one-off Action - eg just creating a record that won't be edited again. 
  • There are multiple buttons for mutltiple multiple things to create - don't mix and match. 
  • It's an Action to Create a related record - Only Global Actions can be used in the Create of a Related Record Component. 

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

...

  • Toast! You can create a Custom Success Message on Create and Update Quick Actions that shows a link briefly to the new record created or the record updated. Note: It won't show the ID of the newly created record like a standard create does. 
  • If your Create Record Action is not showing up, ensure you have it set to create a specific Record Type IF you have Record Types on that Object!
  • You can't do conditional filters on Record Type anymore it seems. You couldn't, then they fixed it, but it seems like it's not possible anymore. Create a formula field named RecType with a formual of RecordType.Name.
  • Blank Spaces on the left hand side of the layout do nothing. The fields just align left. So try to design your layouts to the left. 
  • You can't (yet - don't know if it's coming), override a standard Button (eg New Case) with a Quick Action - you can with a Flow though, as long as it's embeded in a Lightning Page - see notes above. 
  • The Mass Quick Actions on Cases can't be a Flow, they can only be an Action. 
  • Can't set predefined values for Rich Text Areas, Multi Select Picklists (https://help.salesforce.com/HTViewHelpDoc?id=predefined_field_values_notes.htm&language=en_US
  • Quick Actions can't be Profile specific - eg if you have Create Case as a Quick Action, it will be shown to all users that can use that Page Layout, regardless of if they have Case permissions. 
    • This is quite evident when setting up a Partner or Customer Community. 
    • The trick is then that you are going to need to set up, and maintain, different page layouts for different profiles. 
  • You can't Clone Actions which is highly annoying. 
  • You can NOT put formula fields on Create Record Actions, oh how annoying is this! I just want to give the user some guidance. The only way around is to create a flow! 

Tips

  • Know exactly where the Actions Buttons will appear - see Kristi Guzman's webinar to understand what goes where. 
  • Always override the standard Salesforce Mobile and Lightning Experience Actions bar to ensure you have every Action in the right location
    • Chatter Actions
    • New Record Actions
    • Update Actions
    • Edit
    • Change Record Type
    • Change Owner
    • Clone
    • Other Buttons
    • Delete
  • Set the No. of Buttons to be displayed on the Lightning Record Page to make it look reasonable and so the Delete button is hidden below the dropdown. 
  • You can create a Feed Item (say on the Parent record when creating a Child record, just by setting the Feed Item checkbox on the Action. 
  • See Accounts for an example Layout. 

...

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

  • Why isn't the standard Post Action and the Chatter Feed not showing on my Lightning Record Page
    • Two things must be in place:
      • The Post Action must be on the Salesforce Mobile and Lightning Experience Actions bar on the Page Layout and
      • The Object must be enabled for Feed Tracking. 
  • Why can't I create an Update Action on Global Actions
    • Sorry, it's just not possible. Global Actions are not aware of the context so they can't update a record that they know nothing about. So use Object Specific Quick Actions instead. 
  • Why isn't my Send Email Action showing?
    • It's an org before Spring '17 and you need to re-create the Send Email Actions in Lightning
    • It's a Sandbox and you don't have Email Deliverability set. 
    • There is no Email field on the Object. 
    • The Send an Email Action has not been added to the Salesforce Mobile and Lightning Experience Actions bar.
  • Why isn't my Send Email Action working. 
    • You don't have Send Email permissions. 
    • There is no email address entered on the record. 
  • Why isn't my Create Record Action appearing on the Lightning Page
    • Make sure it is creating a record of a specific Record Type. 

...