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="Sample_Request__c" extensions="zkmulti.BulkShipmentController" recordSetVar="recordSet" lightningStylesheets="true" standardStylesheets="false" sidebar="false" applyBodyTag="false" docType="html-5.0">
       var casId = 'a1Cf40000024mv5';

       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;

           if (window.sforce && sforce.one) {
               sforce.one.navigateToURL(url, true);
           } else {

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"


You can use these optional variables to order the printing by name for example.

order_field - Campaign Member field

order_direction - Order direction


This you can do by updating the URLFOR line. 



{!URLFOR('/apex/zkmulti__BulkShipmentList', null, [orderfield='Name', orderdirection='ASC'])}


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.