Saturday, March 26, 2016

Mass Actions

Ever wonder if you can do Mass Edit, Mass Update, and Mass Delete from List View or Related List page layout in Salesforce?

Out of the box, you cannot do this in Salesforce, you need to use Data Loader or other data management tools. But wait a second, what is the different between mass edit with mass update? In this context:

Mass Edit - to update multiple selected records in View for multiple fields, you can enter value for each record and field manually.



Mass Update - to update multiple selected records in View for a selected field with the same value. Use case: to update multiple opportunities to new Stage at once.



With Mass Actions app available free in AppExchange, you can do this without need to hire a developer. Both screenshots above taken from Mass Actions app. Imagine productivity gain when you have this tool available for your organization.

Mass Actions provide 3 functions (edit, update, and delete) for 4 main Salesforce objects: Account, Lead, Contact, Opportunity. Once installed, you need to configure to make the buttons available for your user in List View or in Related List page layout. Follow this guide Post Install Setup Instructions and User Guide to add buttons to List View. It depend on your business needs if you need to add all 3 buttons, or you can just add 1 button, e.g. Mass Edit only. Once button added to List View layout, you should see the buttons when open a View for that object.



The same buttons can be added to related list of a page layout, example: Contact related list in Account page.



Questions:

Can I modify fields in Mass Edit?
Yes, create a new button, copy the original JavaScript and change the selectedFields. Remember to use this custom button instead of original custom button, follow this steps:
  1. Go to your object in setup, click the "Mass Edit" button and copy the JavaScript
  2. Create a new custom button call "Mass Edits", with Display Type = List and Behavior = Execute JavaScript 
  3. Paste the original JavaScript into the large box
  4. Update the line of code that says selectedFields (here is an example from Account: selectedObject=account&selectedFields=Name,OwnerId,ParentId,Phone,Website,Type,Industry,BillingStreet). Remove or replace any fields that you don't want to see with fields you do want to see.
  5. Add your new "Mass Edits" custom button to your list views (ignore the installed one)

Now you see the exact fields you want your users to mass edit.



Can I implement this in other object or custom object?
Yes, create a new button, copy the original JavaScript and change the selectedObject (and selectedFields for Mass Update).

Step 1. Get the JavaScript from installed buttons, e.g. to get JavaScript associated with “Mass Delete” button in Account object: Setup | Customize | Accounts | Buttons, Links, and Actions | double click “Mass Delete” => Copy the JavaScript

Step 2. Create new buttons for a custom object . (e.g my object is Country)
Setup | Create | Objects | click the custom object ( note down the API name of your object, e.g. mine is Country__c) | scroll down and look for  Buttons, Links, and Actions section | click “New Buttons or Links” | select Behavior “Execute JavaScript” => Then paste the JavaScript that you just copied.

Note: You need to make one modification to the script: find “Account” and replace all Account with the API name of your custom object, e.g. I replaced “Account” with my Object Name “Country__c")

Step 3: Assign the button to layout




Type: AppExchange (Managed Package)

Paid/Free: Free



Similar app: Mass Update And Mass Edit From List View by Salesforce Labs


Version: 1.3
Blog last updated: 26 Mar 2016






No comments:

Post a Comment