Monday, March 5, 2018

Salesforce: Global Actions in Lightning

Global Actions not only can be used in Salesforce mobile app and Salesforce for Outlook but also in Lightning experience. Global actions are intended for users want to do something quickly, one of the actions is to create object record quickly, but the new record will not auto relate with other records, such as when creating Contact for Account, the user need to manually select the Account from New Contact action layout.

Global Actions in Lightning experience appear at the top right in the "+" icon.

How/where above actions are defined?
In the setup menu, search for Global Actions, and select Publisher Layouts, you will see one or many layouts here (many if other admins have create it), if you have many layouts, you can assign the different layouts to different profiles. Within the layout, you can define the actions available and the order of actions.

Below screenshot is the layout setup for above screenshot of global actions in Lightning. If you realize, only the one in yellow highlight appears in Lightning experience.

By default, "Salesforce Mobile and Lightning Experience Actions" will follow "Quick Actions in the Salesforce Classic Publisher", if that is not overwritten.

Why fewer actions are shown in Lightning compare with actions added in the page layout?
Post, File, Link, Poll, Questions, and Thanks are Chatter actions, they will be not shown in Lightning.
New Account in this scenario is not shown in Lightning Global Actions, this New Account is default Global Actions provided by default, but since this org. have record type for Account, therefore it will not show, we cannot select record type when creating a record using Action.

New Account 1 and New Account 2 are custom actions added in Global Actions, but with the populated record type, so they appear in the Lightning Global Actions.

Side note: if you notice there is a checkbox "Chatter Feed Item", if this is enabled, when the user creates the record from Action, there will be Chatter Post for the record. 

Now, let's login as other users with lesser permissions.

Compare with the 1st screenshot, this user only allows to create new Note and Account with Record Type = Normal (see 3rd screenshot). Available actions will be auto adjusted as per user permissions defined in Profile and Permission Set. This user does not have permission to create Task, Event, Contact, and Account with record types = Not-Normal.

Action Type in Global Actionwhat action can do in Global Action?

Action Type in Object-Specific Action let's compare what action available in object-specific actions

In Global Action, we have additional action types which are not in object specific action:
- Send Email
- Custom Canvas

While in object specific action, we also have additional action types which are not in global action:
- Update Record
- Flow