1. Home
  2. Docs
  3. Guides
  4. Bulk Shipping
Live Chat

Bulk Shipping Guide

Create or void up to 200 shipments at a time.

Bulk Shipping 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">

<script>
	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 {
			window.location.replace(url);
		}
	}
</script>
</apex:page>
			

Make the following changes to the code:

  1. Change this line "var casId = 'XXXXXXXXXXXXXXXX'; " to correspond to your Custom Address Source object ID
  2. 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')}
to
{!URLFOR('/apex/zkmulti__BulkShipmentList', null, [order_field='Name', order_direction='ASC'])}

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

Use the same object and page from step 1. Go to Settings > Object Manager > Your Object > Buttons, Links, and Actions and click on New Button or Link

Fill in the information as shown on the screenshot.

Add the new button to Search Layout

Go to Setup > Object Manager > Case > Search Layouts for Salesforce Classic and edit the List View layout.

Select Bulk Void from the Available Buttons and add it to the Selected Buttons column, then save your changes.

Once the button is enabled you can follow our Bulk Ship User Guide on creating bulk shipments.

Bulk Voiding

From v1.100 and above you can also bulk void shipments. If the Bulk Void button is not available on your Shipments list view, this is how to add it.

Go to Setup > Shipments > Search Layouts for Salesforce Classic.

Edit the List View layout.

Select Bulk Void from the Available Buttons and add it to the Selected Buttons column, then save your changes.

Now if you go back to your Shipments list view you can see the Bulk Void button at the top of the screen.

Once the button is enabled you can follow our Bulk Void User Guide for bulk voiding shipments.