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

Batch Apex running mode (parallel and series) and ... In my early post, I’d shared about how to write a Schedulable Batch Apex in Salesforce, and I’ll show you how transactions run in batch Apex and how to maintain their state across these transactions in this post. Batch Apex running mode (parallel / series) As we know, each execution of a batch...
Using Custom Metadata Types and Custom Settings in... Custom Metadata is one of the new features that released at Summer'15 of Salesforce, which is customizable, deployable, packageable, and upgradeable application metadata, and it supports the following custom field types.   • Checkbox   • Date   • Date and Time  ...
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...
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...