1. Home
  2. Docs
  3. multi
  4. bulk_ship_from_list_view
Live Chat

Bulk Ship from a List View

1. Create a new VisualForce page 

Name the page something like BulkShipment and add the following code:

<apex:page standardController="Case" extensions="zkmulti.BulkShipmentController" recordSetVar="recordSet" lightningStylesheets="true" standardStylesheets="false" sidebar="false" applyBodyTag="false" docType="html-5.0">
var records = {! recordIds };
console.log('records', records);
if (records.length < 1) {
alert("Please select at least 1 record.");
} else {
var ids = records.join(',');
var url = "{!URLFOR('/apex/zkmulti__BulkShipmentList')}";
if (url.indexOf('?') !== -1) {
url += '&recIds=' + ids;
} else {
url += '?recIds=' + ids;
url += '&casId=' + casId;

Make the following changes to the code: 

a) Change this line "var casId = 'XXXXXXXXXXXXXXXX'; " to correspond to your Custom Address Source object ID

b). Change the standardController=”Case” to the object you are working from e.g. "Order" or "Custom_object__c"

2. Create a new list button for the object (e.g. for Case)

Use page from step#1 -

3. Add new button to 'Search Layouts'

4. You're ready to mass ship!

Now you can go to your object's list view, click "Bulk Ship" and watch the shipments create in bulk.