Many manufacturing and warehousing businesses need to print license plates for tracking raw materials/finished goods inventory and shipping labels for outbound product shipments or cross-docking. But manually creating labels for every shipment or order is an extremely time-consuming and error-riddled process. Zebra printers offer a great way for organizations to overcome the challenges of these manual processes. By printing labels directly from a D365 F&O or any ERP system, users can improve error proofing of labels, reduce misprints, and significantly reduce the amount of data entry required to generate labels – thereby making labeling an efficient and cost-effective process.
Zebra printers operate via a programming language known as ZPL and are known for being the industry standard for producing label files. D365 F&O provides features to quickly set up a zebra printer as a network printer and efficiently print labels. In this blog, we will see how to implement or integrate ZPL label printing with D365 F&O.
For development purposes, if you do not have an actual ZPL printer, you can configure a dummy printer and install the ZPL Printer chrome extension to see the print output. We will describe this in a later section.
On your machine go to Control Panel -> View devices and printers.
Click on Add a printer button.
Click The printer that I want isn’t listed link.
Click Add a local printer or network printer with manual settings. And click Next.
Select the Create a new port option.
Select Type of port = Standard TCP/IP Port.
Set Hostname or IP address = 127.0.0.1
Keep Query the printer and automatically select the driver to use as YES.
Wait till the Detecting TCP/IP port operation is completed.
Select Device type = Custom.
Click on the Settings…
Ensure that the settings are as per the below screenshot
Click OK and then click Next.
Wait till the Detecting the driver model… operation is completed.
In the Install, the printer driver screen, select Generic / Text only.
In the Printer name, type in DummyZebraPrinter or any other name you like.
Set Do not share this printer.
Click Next and then click Finish.
DummyZebraPrinter will be available under Printers as shown in the below screenshot
Install Zpl Printer Chrome Extension
Use the below link to install the ZPL printer Chrome extension.
In Dynamics 365, open the Network printers page (Organization administration -> Setup -> Network printers).
On the Options tab, in the Application group, click Download document routing agent installer. Refer to the below screenshot:
Run the downloaded file to begin the installation process.
Complete the setup process.
After the application is installed, you can register local printers as network printers for the applications
Configure the Document Routing Agent (DRA)
On your desktop, run the Document Routing Agent.
On the toolbar, click Settings.
Enter the following details
Dynamics 365 F&O URL – The base URL of the application.
Azure AD tenant – The domain name of the Azure AD.
Click Sign In to sign in to your account.
Register Network Printer
On the toolbar, click Printers.
Select the printers to make them available in the applications and click Register
Administer Network Printers
Open the Network printers page (Organization administration -> Setup -> Network printers).
To include a printer as an option in the Print Destinations field, set the Active field to Yes.
For label designing, you need to install the ZebraDesigner Software
Install ZebraDesigner software
After installing ZebraDesigner software, if you face the below error while opening ZebraDesigner, then you need to install Zebra Setup Utilities. This utility will install the necessary drivers
After the ZebraDesigner setup is completed, you are ready to design a label. Refer to the below sample screenshot of the label design
Here elements like $FromName$, $ToName$ etc. (text starting and ending with $ sign) are placeholders. This whole design will be treated as a template and the placeholder will be replaced by actual value while printing.
After completing the label design, click on the Print
Print to file checkbox should be checked and then click on Print
With the click of the Print button, the application will ask you to save the file. Save the file to your desired location.
Open the saved file in notepad. The content of the file is the ZPL format of the label that you have designed.
If you want to see the design of generated ZPL code or you want to design Label using code itself, you can use the label site http://labelary.com/viewer.html
The left-hand side is the code editor and the right-hand side is the label preview
Document Routing Layout Setup
In D365, ZPL formats are set up in the Document routing layouts
In D365, open Document routing layout page (Warehouse management -> Setup -> Document routing -> Document routing layouts)
Create New document routing layout and paste the content of print output as created above in the label layout.
Click on Save.
Document Routing Setup
After document routing layout setup, you need to setup Document routing
In D365, Open Document routing page (Warehouse management -> Setup -> Document routing -> Document routing)
Create new document routing and enter the required details
For the Document routing printer section, add Printer and Layout ID as per requirement.
Based on the document routing setup, the Printer and Layout will be picked up for printing by the D365 application
Label printing is used in the standard functionality, for e.g., when work is created and the respective details are updated in the license plate labels form in D365FO
If you want to customize label printing, you can refer to printDocument method of WhsDocumentRouting
Below is the snapshot of the printDocument method. This method fetches document routing and then the translate method replaces the placeholders/variables to actual Dynamics values and then sends the finals ZPL string for printing to the printer.
If you want to customize the ZPL label printing, you can fetch the layout from routing as shown above and then replace placeholders/variables as per your need.
After the creation of the ZPL string, you need to pass it to the below method
While printing the label, ensure that the Document routing agent and ZPL printer Chrome extension are up and running
When the label is printed, it will be displayed on the ZPL printer Chrome extension as shown below.
The accuracy and efficiency of warehouses and distribution centers depend largely on label printing. But since manually printing these labels can be an exhaustive endeavor, Zebra printers offer an exceptional alternative, helping organizations reduce operator errors, streamline operations, and minimize printing costs. Setting up a Zebra printer in D365 is a great way to automatically print labels and improve tracking and shipping efficiency.
Synoptek is a business and technology consulting firm that helps organizations envision, transform, and evolve. As a global systems integrator and managed technology services provider, we partner with organizations worldwide to help them navigate the ever-changing technology landscape and build solid foundations for their business.
Jayesh Dharade is a technical professional with over 8+ years of experience with different Microsoft technologies. He has majorly worked on D365 F&O, .Net, Jquery and SharePoint. Currently, he is involved in D365 F&O project implementation, customization, integration and support.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.