Business Integration Solutions Documentation
How To: Example Label Printing
New Connection
Start by providing a Label Connection No., in this example we used PRINTLABELEXAMPLE
Create Documents
We will need Documents to get information for NAV (Internal Document) and for the Label Software (External Document). Click on "Documents" on the Navigate Page.
In this example we will use internal data from the Item table:
Start by using the "Internal" and enter a Document No. "PRINTLABEL"
Select "Add Table" and select the Item table. Then select "Add fields" and add the "No." and "Description" fields. Continue by creating the External document. Make sure the Type of the Document is "External".
To determine the External Document, the Label Template should be consulted to discover which fields are required on the Label. In this example we have defined 3 fields on the label; ContainerID, ItemNo and ItemDescription. This fields should match the exact names to be able to print the correct data on the label.
This example only makes use of standard printer, template and no. of copies setting. Help page "How To: Setup Label Printing Element" discusses the option to include these values as input from the user added to the External Document. Elements
To print labels we need to determine where it should be printed from. In this example we use the Button on a Page to print, which starts a "User Event" element and functions as the start of processing the print action. Other elements are also allowed to be used to trigger a label print. The following Elements should be used; UserEvent, XMLGenerator, Mapper and LabelPrinting.
All 4 Elements turn red after these have been added to the Label Connection. Each Element will need to be edited and settings should be changed to ensure the correct behavior of the Element. Editing the UserEvent:
The Item Card Page is used to let the user print a Label, the Page No. is entered on the General Tab. Editing the XMLGenerator:
Add the Internal Document No. to this Element, in order for the system to build the XML message according to the correct model. Editing the Mapper:
In this example our Source Document is of type "Internal", with created Document and our Target Document is of type "External" and external label document. Now the internal and external document have been identified, the mapping needs to take place:
First start with the root level (Top line) and match the LabelPrinting with the Item in this example. Then start mapping the fields. All these actions take place using the assist-edit wizard. Editing the LabelPrinting Element:
Enter the following fields for this example: - Document No.: External Document - Automation Level: Drop-File exchange - Folder name: Folder location to place the file - File Name: Compose a unique and compatible file and extension - Printer: Default value: available printer - Label Name: Default value: Select Label that matches the fields on the External document - No. of Copies: Default value: Enter the number of copies that should be printed Pipeline
Now the individual Elements need to be set in a specific order. The Pipeline is used to determine this order.
Item Card Page Modification
In order to print the label, the Item Card Page needs to be modified. The sample files folder contains a file "Item label example.fob" and connection package "Label-connection.zip" that can be imported. Print the label
The Item Card page shows the "Print Label" button, that allows a user to print the label from here.
Press the button and check the folder for the created file:
Opening the file with Notepad shows the content and reveals the specific data from the Item No. 1000 and including the default data from the Label Connection setup. History
For every Label that is printed, an entry is stored into the history of the Connection that processed the data. In this example the PRINTLABELEXAMPLE Connection processed the Item print action on the page.
The individual messages can be accessed by clicking on the number or on the "History" button in the ribbon.