background

Part 2 of 3: Pick and Pack station on Salesforce – Custom Labels and Packing Slips

Published on 29 November 2016 in salesforce 

Last week we wrote a first post on how we created a Pick and Pack station on Salesforce. In that post we’ve covered UI, scanning barcodes and integrating weights and scales. Today we’re focused on label generation and custom printing.

  1. Labels

 

  • And how it looks once printed out:
labelary-online-zpl-viewer-google-chrome-2016-11-28-11-27-20
  • The quickest way to test your ZPL coding is to load your code into http://labelary.com/viewer.html, and press the Redraw button, it will then show you what the label will look like once printed out.
online-zpl-viewer
  1. Custom printing
    • By Using our Zenkraft Printing app we were able to send jobs to the pre-defaulted printers based on user actions. Here is some example code to show how we can send labels for printing:

 

  • In the code above, we can see that ‘line 18’ sends the label for printing, where “this.labelId” is the attachment id of the salesforce object where the label resides.
  • For example, once a box was packed successfully and the user set the box as closed, we automatically sent two print commands; one to the thermal label printer to print out the content label (we mentioned in the previous post), and secondly we send the command to the laser printer to print out the packing slip (our PDF page).
  • Hopefully in the future HTML5 will support native browser printing, but until then our desktop app works great for automating print jobs from the browser.