Friday, February 20, 2015

Add or remove Actions in Salesforce mobile app

Since version 7, Salesforce1 mobile app has replaced + icon to open Publisher Actions page with Action Bars and Action Menu. Before version 7, when user tap + icon, it will open the new page with multiple icons and paging.

In version 7, this is completely changed with Actions Bar.

Depending on which menu or record page user is viewing, the user will see different actions available in the action bar.

From Feed (or Chatter in the newer app version) and Today page, the user will see a set of actions (this may include Standard Chatter actions and Mobile Smart actions) defined in Global Publisher Layout, you can have multiple layouts and assigned to different profiles.

However, from a record page, the user will see a mix of actions and buttons added to object page layout:
  • Standard Chatter actions: such as Post, File, Link, Poll, Question, and Thanks.
  • Default actions: depend on the objects.
  • Mobile Smart actions: a set of preconfigured actions, just like default actions. They are available for account, case, contact, lead, opportunity, and custom object layout, including in Global Publisher layout.
  • Custom actions: actions that you create and customize, such as Create a Record, Update Record actions.
  • Productivity actions: depends on the objects. The actions include Call, Send Text, View Website, and Email.
  • Standard button: such as Change Owner, Change Record Type, Edit, Delete (action will be shown only if the user has the permission or the object fit the criteria, such as object with Record Type).
  • Custom button: buttons created with Display Type = Detail Page Button
If you have more than 5 icons, tap ... icon to open Action Menu which contains the full set of actions available for that page or record.

Global Actions
Appear in Feed (or Chatter in the newer app version) and Today page, by default Actions Bar will have icons of Post, File, New Event, New Task, and so on. How we can add/delete/re-order the icons?
  1. Navigate to SetupCreateGlobal ActionsPublisher Layouts
  2. You can have many layouts assign to different Profile. Select a Global Publisher Layout by click Edit link
  3. You will see available Actions available. You can add, remove, and re-order by drag and drop the icon in the Global Publisher

Create custom object record using Action
By default, Salesforce provides more than 10 default Global Actions, including create a record for standard objects such as New Account, New Case, and etc., also Email and Log a Case.

If you have custom objects, you will not see New action for those objects. You need to create Global Actions for each of them. Let us go through a sample:
  1. Navigate to SetupCreateGlobal Actions | Actions
  2. Click New Actions button
  3. Assume the object name is Service, enter Action Information as the screenshot below
  4. You will notice New Service now available in the available Actions
  5. Edit Global Publisher Layouts and drag New Service into Actions in the Publisher
create global action

add action to global publisher layout

new action added to global publisher layout and appear in Salesforce app

Object-Specific Actions
There are five types of object-specific actions:
  • Object-specific actions create records that are automatically associated with related records. For example, you add an object-specific action on the Account object that creates contacts. If a user creates a contact with that action on the detail page for the Acme account, that new contact is automatically associated with Acme.
  • Object-specific update actions make it easy for users to edit records. You define fields to be available when user update the record.
  • Object-specific Log a Call actions let users enter notes about calls, meetings, or other interactions that are related to a specific record.
  • Object-specific custom actions are Visualforce pages or canvas apps that let users interact with or create records that have a relationship to an object record.
  • Send email actions, available only in cases, give users access to a simplified version of the Case Feed Email action on Salesforce1
The default Object-Specific Actions available are depends on the object itself, check out this matrix.

You can configure object-specific actions from the object page layout, example for Account:
  1. Navigate to SetupCustomize | AccountsPage Layouts
  2. Look for Salesforce Mobile and Lightning Experience Actions, by default it will be inherited from the global publisher layout, but you can overwrite by click link override the predefined actions
  3. Mobile Smart Actions will be added by default, see reference below for more information. 

If the object has Lookup relationship with another object, example: Area custom object has a lookup relationship to Region custom object. You can create a Global Action to create Area record and add this global action to Global Publisher Layout. When the user executes the action from mobile or from Lightning Experience, Region will be blank, so the user needs to enter the Region manually.

For the same Area object, if we create new Area action from Region object, and add this object-specific action to Region layout, Region will be auto-populated in new Area layout.

Note: you can add Global Action to object page layout.

Now, let's see how this work for objects with Master-Detail relationship.
1. You can't create Global Action for a custom object which is a child in the Master-Detail relationship.
2. Only object specific action can be created for this kind of object, the action will be created from the parent object.

Let's see a sample on creating object specific action and adding the Action to the object layout, in this sample we will create Service (child) from Opportunity (parent).
  • Navigate to Setup | Customize | OpportunitiesButtons, Links, and Actions
  • Click New Action button and enter Action Information
  • You can define fields visible when the user clicks the Action.
  • Navigate to Opportunities Page Layout, find Action created and drag to Salesforce Mobile and Lightning Experience Actions

This is how it looks when the user selects Action menu:

Opportunity Name will be automatically populated:

Last update: 20-Mar-2018


No comments:

Post a Comment

Page-level ad