Επεξεργασία

Κοινή χρήση μέσω


License plate label layouts and printing

Labels layouts are used to control what information is printed on a label and how it's laid out. There are two ways to define a license plate label layout:

  • Document routing label layouts – These layouts provide basic layout capabilities.
  • Label layouts – These layouts let you build more advanced layouts. Your layouts can have repeating structures and include header, body, and footer elements. You can print information from the related tables and define custom date, time, and number formats.

This article describes how to create and use label layouts for license plate labels. For more information about document routing label layouts, see Document routing label layouts.

Enable license plate label layouts

To enable license plate label layouts, you must set up the following elements (as described later in this article):

Set up warehouse management parameters

Follow these steps to set up warehouse parameters for license plate label printing.

  1. Go to Warehouse management > Setup > Warehouse management parameters.
  2. On the General tab, on the License plates FastTab, set the Use label layouts for license plate labels option to Yes to use label layouts for your license plates (as described in this article). Set it to No to use document routing label layouts instead.

Create a license plate label layout

The label layout controls what information is printed on the label and how it's laid out. Here, you enter the ZPL code that's sent to the printer. Typically, you'll copy this code from a label designer program.

As the system generates a label, it can replace field and method names that are used in the label layout with actual values. You can easily find text that will be replaced by looking for dollar signs ($) in the code.

Create a basic label layout

Follow these steps to create a license plate label layout.

  1. Go to Warehouse management > Setup > Document routing > Label layout.

  2. At the top of the list pane, set the Label layout type field to License Plate Label.

  3. On the Action Pane, select New to create a label.

  4. Set the following fields for the new label:

    • Label layout ID – Enter a name for the layout (for example, License plate).

    • Description – Enter a short description of the layout (for example, License plate).

    • Definition type – Select the method that's used to define the label layout:

      • ZPL – Define the label layout by using ZPL.

      • Variables – Define a label layout that can be used with an external service. (Learn more in Print labels using an external service.) If you select this option, the Printer text layout FastTab provides grids where you define system variables and data variables. Under System variables, set the LabelFile field to the path of the label design in the external system, and set the Quantity field to the number of labels to print. Under Data variables, define the values that are sent from Microsoft Dynamics 365 Supply Chain Management by mapping them to the corresponding placeholders in the label design from the external system.

      • Variables (script) – Use the script format to define a label layout that can be used with an external service. (Learn more in Print labels using an external service.) On the Printer text layout FastTab, define the label file, the quantity, and the values to send. Here's an example.

        "filePath": "/Instant Print/GS1-128.nlbl", 
        "quantity": "1",
        "dataSources": [
        {
            "GTIN of Contained Trade Items": "06183928726611",
            "Product_name": "D365FO: $ItemName$"
        }
        ]
        
    • Label layout data source ID – Leave this field blank if you'll use only license plate data. If you must include data from other tables, select a label layout data source that has the required joins. For more information about how to set up and use a label layout data source, see the next section in this article.

    • Enable label template support – Leave this option set to No for now. (When it's set to Yes, you can add header, row, and footer elements to your layout, as described later in this article.)

    • Date, time, and number format – Select the language to use when date, time, and number values that are shown in the label layout are formatted.

    • Printer stock type – Select a printer stock type. A printer stock type typically describes the type of paper that a specific printer uses. It's also used to specify the type of paper that a specific label layout should be printed to. For information about how to set up printer stock types, see Set up printer stock types.

  5. On the Printer text Layout FastTab, enter label code in a way that's appropriate for the selected definition type. The following example shows code that you can copy and paste for testing if the Definition type field is set to ZPL.

    CT~~CD,~CC^~CT~
    ^XA~TA000~JSN^LT0^MNM,0^MTT^PON^PMN^LH0,0^JMA^PR8,8~SD15^JUS^LRN^CI27^PA0,1,1,0^XZ
    ^XA
    ^MMT
    ^PW831
    ^LL609
    ^LS0
    ^FT19,59^A0N,28,28^FH\^CI28^FDLicense plate label^FS^CI27
    ^FT19,148^A0N,42,43^FH\^CI28^FDItem: ^FS^CI27
    ^FT128,148^A0N,42,43^FH\^CI28^FD$ItemId$ ^FS^CI27
    ^BY3,3,180^FT116,525^BCN,,Y,N
    ^FH\^FD$LicensePlateId$^FS
    ^FT19,206^A0N,42,43^FH\^CI28^FDQty:^FS^CI27
    ^FT128,206^A0N,42,43^FH\^CI28^FD$Qty$^FS^CI27
    ^PQ1,0,1,Y^XZ
    

    Note

    While you're customizing the label code on the Printer text layout FastTab, you can add valid field and method names by following these steps:

    1. In the Tables list, select the table.
    2. Depending on the type of item that you want to add, select either the Fields tab or the Methods tab, and then select the name of the field or method to add.
    3. If the Definition type field is set to ZPL or Variables (script), select Insert at end of text to add the field or method to the end of the code. As you require, move the new field or method to the place in the code where you want to use it.
    4. If the Definition type field is set to Variables, select a row in the Data variables table, and then select Insert field reference to add the field or method as a field value.
  6. On the Action Pane, select Save.

Set up and use a label layout data source

In the label layout in the preceding example, only the license plate ID ($LicensePlateId$) is used, and this value is available directly in the license plate table. If you want to include related information (such as that order number that's related to a license plate), and the required layout label data source doesn't already exist, follow these steps to create it and then select it in your label layout.

  1. Go to Warehouse management > Setup > Document routing > Label layout data source.

  2. On the Action Pane, select New.

  3. Set the following fields for the new label layout data source:

    • Label layout data source ID – Enter a name for the data source (for example, LPPlusPurchOrder).
    • Description – Enter a short description of the data source (for example, License plate + Purchase order).
    • Label layout type – Select License plate label.
  4. On the Action Pane, select Save.

  5. On the Action Pane, select Edit query.

  6. A standard query editor dialog box appears. On the Joins tab, add joins to the required tables. (For example, if you want your label to show the order number, you might make a join to the purchase order table.)

  7. Go to Warehouse management > Setup > Document routing > Label layout.

  8. Create or select a label layout, and then, in the Label layout data source ID field, select the record that you just created.

  9. You can now add the new field values to the print layout code. Be sure to reference the correct table.field-names values in the ZPL code. The additional tables will include a number as a suffix (_#).

Caution

On the Label layout data source page, be careful about removing a table from the query for an existing record. You might remove field and/or method names that are already used in existing label layouts.

Enable label template support

Label templates let you design labels that have more advanced layouts, which can include header, row, and footer elements. Follow these steps to format a label that includes label template elements.

  1. Go to Warehouse management > Setup > Document routing > Label layout.

  2. At the top of the list pane, set the Label layout type field to License Plate Label.

  3. Follow one of these steps:

    • To create a new layout, select New on the Action Pane.
    • To edit an existing layout, select the layout on the list pane, and then select Edit on the Action Pane.
  4. In the Label layout data source ID field, select a data source. (A data source is required to enable label template support. However, if you need only license plate data, you can select a very simple data source where no joins are defined.)

  5. Set the Enable label template support option to Yes.

  6. Use the {{Header ... }}, {{Row ... }}, and {{Footer ... }} elements in your code. The following example shows a label that includes all these elements. It prints data about items that are put in a license plate.

    {{LabelStart
    ^FX ... ZPL commands that will be printed on every label ...
    CT~~CD,~CC^~CT~
    ^XA
    ~TA000
    ~JSN
    ^LT0
    ^MNM,0
    ^MTT
    ^PON
    ^PMN
    ^LH0,0
    ^JMA
    ^PR8,8
    ~SD15
    ^JUS
    ^LRN
    ^CI27
    ^PA0,1,1,0
    ^XZ
    ^XA
    ^MMT
    ^PW831
    ^LL609
    ^LS0
    }}
    {{Header
    ^FT31,59^A0N,28,28^FH\^CI28^FDLicense plate label with work lines^FS^CI27
    ^BY3,3,180^FT116,300^BCN,,Y,N
    ^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS
    }}
    {{Row Table=WHsWorkLine_1 StartY=400 IncY=68 RowsPerLabel=5
    ^FT19,$position.YPos$^A0N,42,43^FH\^CI28^FDLine:^FS^CI27
    ^FT128,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.ItemID$^FS^CI27
    ^FT250,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.QtyWork$^FS^CI27
    }}
    {{LabelEnd
    ^PQ1,0,1,Y
    ^XZ
    }}
    

    Note

    Because of the RowsPerLabel=5 attribute, this example will loop over license plate lines and split out a label for each set of five license plate lines. If you change the attribute to RowsPerLabel=1, a label will be generated for each line.

    This example will print one copy of each label. If you require more copies (for example, one copy for each side of the license plate), set the n value for the \^PQn section in the footer to the required number of copies. For example, to print two copies of each label, specify \^PQ2.

Set up license plate label routing

To specify the license plate label layouts that are used and where they're printed, you must define a document routing record, as described in the following procedure.

  1. Go to Warehouse management > Setup > Document routing > Document routing.

  2. At the top of the list pane, set the Work order type field to Purchase orders.

  3. On the Action Pane, select New to create a routing record.

  4. On the header of the new routing record, set the following fields:

    • Sequence number – Enter an integer to define the order that the routing record should be evaluated in. Each routing must have a unique sequence number. The system evaluates routings in order of ascending sequence numbers and uses the first routing that criteria are met for.
    • Name – Enter a name for the routing record. For example, enter License plate.
  5. On the Overview FastTab, use the following fields to define the criteria that are used to select the label routing:

    • Warehouse – Specify the warehouse where the routing should be used.
    • Mobile device user ID – Specify the user ID that the routing should be used for. To use the routing for any worker, leave this field blank.
    • Account number – Specify the vendor account that the routing should be used for. To use the routing for any vendor, leave this field blank.
    • Carrier – Specify the carrier that the routing should be used for. To use the routing for any carrier, leave this field blank.
    • Work template – Specify the work template that the routing should be used for. To use the routing for any work template, leave this field blank.
    • From zone ID and To zone ID - Specify the range of zones that the routing should be used for. To use the routing for any zone, leave these fields blank.
    • Run query – To add custom selection criteria to a routing record, set this option to Yes, and then select Edit query on the Action Pane. A standard query editor dialog box appears, where you can add more selection criteria.
  6. On the Document routing printers FastTab, assign the printer and label layout that should be used when the criteria for the routing record are met. Select New on the toolbar to add a line to the grid. Then set the following fields for the new line:

    • Name – Select an appropriate ZPL printer. Learn more in Install the Document Routing Agent to enable network printing. Leave this field blank if you want to use dynamic printer selection.
    • Use specified printer – If you want to use dynamic printer selection and use the configured printer as a fallback when dynamic printer selection doesn't find a more specific printer, set this field to As fallback printer. If this field is set to Always and a printer is configured, then dynamic printer selection is disabled.
    • Label layout ID – Select the label layout to use. The example label layout ID value that was suggested earlier in this article was License plate.

Automatically print labels when purchase orders are received by using the mobile app

If you want a license plate label to be printed automatically each time that a new purchase order is received, configure mobile device menu items as described in the following procedure.

  1. Go to Warehouse management > Setup > Mobile device > Mobile device menu items.

  2. Follow one of these steps:

    • To create a new menu item, select New on the Action Pane.
    • To edit an existing menu item, select it in the list pane, and then select Edit on the Action Pane.
  3. Set the following fields for the new or selected menu item:

    • Menu item name – Enter an internal name for the new menu item. For example, enter Mixed.
    • Title – Enter the item name as it should appear in the Warehouse Management mobile app. For example, enter Mixed LP Receiving.
    • Mode – Select Work.
    • Work creation process – Select Mixed license plate receiving.
    • Print label – Set this option to Yes.
  4. Close the page.

If you created a new mobile device menu item, you must add it to the mobile device menu, as shown in the following example. In this example, you'll add it to the existing Inbound mobile device menu.

  1. Go to Warehouse management > Setup > Mobile device > Mobile device menu.
  2. On the Action Pane, select Edit.
  3. In the list pane, select the Inbound menu.
  4. In the Available menus and menu items column, select the mobile device menu item that you created (for example, Mixed).
  5. Select the Add button (right arrow) to move the menu item into the Menu structure column.
  6. Close the page.

Run a scenario to print license plate labels

If you want to experiment with printing license plate labels, you can set up a scenario for doing mixed license plate receiving through the Warehouse Management mobile app. Learn more in Mixed license plate receiving. Follow the instructions there, and confirm that the scenario that's described in this article is supported.