Bulk Approval Processing from List View in Salesforce

I have shared “Approval Processing with Apex in Salesforce” in previous post, and in this post, I’ll continue to share the way of bulk approval processing from Salesforce list view.

The outline we need to do is as below :
・Add a custom button for list view
・Set List View Layout
・Add a Apex Class named “BulkApprovalWebService”

Let’s get started:

Add two custom buttons for list view

Add two custom buttons, “Bulk Request” and “Bulk Approve” as below:

Bulk Request button

Bulk Request Button with the following javascript code:

Bulk Approve button

Bulk Approve Button with the following javascript code:

Set Contract List View Layout

Add custom buttons to List View Layout as the below image: Contract List View Layout

Apex Class

Add an Apex Class with the following source code :

Operation Check

First, submit approval request as “Member B” user by clicking “Bulk Request” button.
Bulk Approval Request Then approve those request as his manager user by clicking “Bulk Approve” button.
Bulk Approve Two records were approved successfully.
Bulk Approved
Enjoy It!

Related Post

Using URL parameters on Salesforce standard pages Salesforce has many URL parameters can be used on its standard page, with this kind of parameters, you can do some URL hacking on it, as below: Note: All of parameters must be encoded with UTF-8. Login page There are two ways to login and access into Salesforce from url. 1. https://
Setup an awesome Salesforce developer environment ... Why Sublime Text 3 ? I've been working with Force.com for about 2 years, and always using Eclipse+Force.com IDE(See here, Eclipse Force.com IDE Installation)as my development environment. I don't think it is difficult to use, but it could more friendly. For example: 1. It doesn't support APEX an...
Write Apex Test Classes efficiently with Tesforce 1.Why Tesforce The Test Classes are required to deploy Apex to a production environment or to be packaged and placed on Force.com AppExchange, it must provide at least 75% code coverage. That will be a huge workload to SFDC Developers if the project(application) include a lot of Apex Classes,the...
Salesforce Mass Editor (Chrome Extension) – ... This's my second Chrome Extension (First one is HERE) this year, named "Salesforce Mass Editor" and it supports for doing the below things : ・Makes any Salesforce list view to be a powerful mass editor. ・Mass insert, mass clone, mass update, mass delete, ALL-IN-ONE. ・Export record data to CSV fi...