Showing posts with label Label layouts. Show all posts
Showing posts with label Label layouts. Show all posts

Wednesday, April 5, 2023

Date, time and number format in layouts

Walkthrough for Date, time and number format on the Label layouts work in the Microsoft Dynamics 365 SCM

In this blogpost I am going to explain the Date, time, and number format configuration available in the Label layout page and how to make it work.

Go to Warehouse management > Setup > Document routing > Label layout.
You will notice Date, time, and number format field there. This field control how numbers and dates were formatted on the printed label. For example, you can have a requirement that numbers need to be formatted - the decimal dot/comma and the thousands dot/comma/tick and so on. Previously it was not possible, for example, to use US number format with European WMA user (or vice-versa). Now you can have it configurable.

Let's imagine that I have the following label layout for license plate labels. I have both number field -Qty and date field - PrintedDate.

Label layout for license plate labels


^XA

^FX Top section 
^CFA,30
^FO50,100^FDOrder Number: $OrderNum$^FS
^FO50,200^FDLicense plate: $LicensePlateId$^FS
^FO50,300^FDProduct: $ItemId$^FS
^FO50,400^FDPrinted Date: $PrintedDate$^FS
^FO50,500^FDQuantity: $Qty$^FS

^FO50,690^GB700,3,3^FS
^FO50,700^FDFrom Location: $WMSLocationIdFrom$^FS
^FO50,750^FDTo Location: $WMSLocationIdTo$^FS
^FO50,800^GB700,3,3^FS

^XZ

In my scenario, I will be using Chrome emulator to present the results. 

So, if you try to print license plate label using the layout above no matter what you select in the Date, time, and number format, it will not change formatting of the date and number. 

But as soon as you add :d to the Date field, it will make a difference.

^FO50,400^FDPrinted Date: $PrintedDate:d$^FS

I have printed 3 labels and for each label I changed the Date, time, and number format field. Pay attention to the Printed Date on the label and how it changes. 

DA Label

DE Label

JA Label

The same story with the Qty.

As soon as you add :N to the number field, it will make a difference.

^FO50,500^FDQuantity: $Qty:N$^FS

I have printed 2 labels and for each label I changed the Date, time, and number format field. Pay attention to the Quantity on the label and how it changes. 
DE-AT Label

EN-US Label


That's it! I hope it helps.


Friday, March 24, 2023

How you print custom labels in SCM

Custom label layout type feature that has been released in 10.0.33 allows you to print any labels for any tables. It is a beneficial especially in the retail industry, for food and beverage customers .

With this feature you can print the following at the minimum:

  • Item labels
  • Item barcode labels
  • Customer labels
  • Vendors labels
  • Locations
  • Fixed locations for items
  • On hand
  • LPs
  • Container Ids

You might be aware of other ISV solutions that have this capability like DSI Print Envoy (ISV), but now SCM also supports this out of the box.

In this blogpost, I will go through some of the example above.

Let's start with printing locations. 

Print locations

1. Set up Label layout data source

Go to Warehouse management > Setup > Document routing > Label layout data source.
Select New and set the following values:
  • Label layout data source ID: Locations.
  • Description: Locations.
  • Label layout type: Custom label.
  • Custom label root table: WMSLocation.
Label Layout data source

2. Set up Custom label layout

Go to Warehouse management > Setup > Document routing > Label layout.
Set the Label layout type field to Custom Label.
Select New and set the following values:.
  • Label layout ID: Locations.
  • Description: Locations.
  • Label layout data source ID: Locations.
On the Printer text Layout FastTab, enter the ZPL code below.

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
^FT40,59^A0N,28,28^FH\^CI28^FDLocation^FS^CI27
^FT19,148^A0N,42,43^FH\^CI28^FDLocationID: ^FS^CI27
^FT230,148^A0N,42,43^FH\^CI28^FD$WMSLocation_1.wMSLocationId$ ^FS^CI27
^BY3,3,180^FT116,525^BCN,,Y,N
^FH\^FD^FS
^PQ1,0,1,Y^XZ

 Label layout

3. Set up Warehouse management parameters

Go to Warehouse management > Setup > Warehouse management parameters.
On the Reports tab, on the Custom labels FastTab, set the Display custom label print buttons option to On all forms.

Warehouse management parameters
 

4. Printer setup 

Go to Organization administration > Setup > Network printers
Make sure Printer is Active
Network printers       

5. Print location label

Go to Warehouse management > Setup > Warehouse > Locations.
Select one or more records.
On the Action pane, on the Options tab, in the Custom labels group, select Print locations.

Location label

In the Print custom labels dialog box, set the following fields:

  • Label layout ID: Locations.
  • Printer name: Select the printer that you want to print from.

 

Print custom labels

 Notification will appear stating how many labels were sent to print.

Print location

And 2 labels will be printed.
Printed labels


If you want to have multiple labels for the same data source, you can also do it. 
For instance, to the example above we would like to have different labels for the locations and locations with on-hand details from the locations. First label we have configured already. Now let's set it up the second label with on hand details:


Go to Warehouse management > Setup > Document routing > Label layout data source.
Select New and set the following values:
  • Label layout data source ID: LocationsInventSum.
  • Description: Locations (+InventSum).
  • Label layout type: Custom label.
  • Custom label root table: WMSLocation.

Label data source 

On the Action Pane, select Edit query.
On the Joins tab, add the InventSum table through Inventory dimensions table.
Select OK.

 

Edit query


Go to Warehouse management > Setup > Document routing > Label layout.
Set the Label layout type field to Custom Label.
Select New and set the following values:.
  • Label layout ID: LocationsInventSum.
  • Description: Locations (+ InventSum).
  • Label layout data source ID: LocationsInventSum.
On the Printer text Layout FastTab, enter the ZPL code below.
 
{{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^FDLocation with on-hand^FS^CI27
^BY3,3,180^FT116,300^BCN,,Y,N
^FH\^FD$WMSLocation_1.wMSLocationId$^FS
}}
{{Row Table=InventSum_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$InventSum_1.ItemId$^FS^CI27
^FT250,$position.YPos$^A0N,42,43^FH\^CI28^FD$InventSum_1.AvailPhysical$^FS^CI27
}}
{{LabelEnd
^PQ1,0,1,Y
^XZ
}}

Go to Warehouse management > Setup > Warehouse > Locations.
Select one or more records.
On the Action pane, on the Options tab, in the Custom labels group you can see 2 buttons since we have multiple label data sources for the same root table
Locations


On the Action pane, on the Options tab, in the Custom labels group, select Print Locations (Locations (+ InventSum)).
In the Print custom labels dialog box, set the following fields:

  • Label layout ID: LocationsInventSum.
  • Printer name: Select the printer that you want to print from.

Print locations with InventSum

Label is then printed

 

Printed label

That's it for today! 

Wednesday, February 22, 2023

License plate label printing with new Label layout in Microsoft Dynamics 365 Supply Chain Management

In this blog post I would like to go through the new Label layout for License plate labels. This is a new capability that is available in 10.0.31.

This is quite powerful capability especially in the following situations:

- when you need to display on the label additional information that is not available in the WHSLicensePlateLabel table. Maybe you need to add information from the corresponding document that is stored, for example, in the Purchase order;
- when you need to display on your labels values with country-specific decimal and thousands separator;
- when you need to generate labels with repeating rows or even multiple labels out of one template.

Let's walk through the configuration and process.

Set up warehouse management parameters

To set up warehouse parameters for license plate label printing, follow these steps:

  1. Go to Warehouse management > Setup > Warehouse management parameters.
  2. On the License plates FastTab, make the following settings:
    • Use label layouts for license plate labels - Choose whether the system should use label layouts instead of document routing label layouts.  Set this to Yes to use label layout feature for license plate labels.


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 is sent to the printer. Typically, you will 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. 

First label layout that we are creating is simple one. Only data from license plate table is printed on the label.

  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 values for the new label:
    • Label layout ID: Enter License plate.
    • Description: Enter License plate.
    • Label layout data source ID: Leave this field blank. (Only license plate data will be used.)
    • 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
    • Date, time, and number format: Leave this field blank. This field is used to set the formats of date, time, and number values that are shown in a label layout, as described later in this article
5. Copy the following example of a ZPL container 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

^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

6. On the Printer text Layout FastTab, paste the copied text into the large field.

7. Close the page.


 Second label layout that we are creating is when we need to display data from Purchase order . 

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

2. Create a label layout data source that includes a join to the Purchase order table.

3. On the Action Pane, select New.

4. Set the following values for the new label layout data source:

Label layout data source ID: Enter LPPlusPurchOrder.

Description: Enter License plate + Purchase order.

Label layout type: Select License plate label.

5. On the Action Pane, select Save.


6. On the Action Pane, select Edit query.

7. A standard query editor dialog box appears. On the Joins tab, add a join to the required tables.

8. Go back to the Label layout page, and then, in the Label layout data source ID field, select the new record for a new or existing layout.

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.

Example will look as below:


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

^BY3,3,180^FT116,525^BCN,,Y,N

^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS

^FT19,148^A0N,42,43^FH\^CI28^FDItem: ^FS^CI27

^FT128,148^A0N,42,43^FH\^CI28^FD$WHSLicensePlateLabel.ItemId$^FS^CI27

^FT19,206^A0N,42,43^FH\^CI28^FDQty:^FS^CI27

^FT128,206^A0N,42,43^FH\^CI28^FD$WHSLicensePlateLabel.Qty$^FS^CI27

^FT19,264^A0N,42,43^FH\^CI28^FDOrder:^FS^CI27

^FT128,264^A0N,42,43^FH\^CI28^FD$PurchTable_1.PurchId$^FS^CI27

^PQ1,0,1,Y^XZ




Third label layout that we are creating is when we need to use more complex structure header, row and footer . We will do it with the help of label template support

If you must create more advanced label layouts, you can benefit from using some of the widely available label generation tools that are described in Document routing label layout.

To format a label by using header, row, and footer elements, open the Label layout page, select or create a layout, and set the Enable label template support option to Yes for the new or selected layout. Then 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 placed in a license plate.

First, we need to create label layout data source.


And the Query


Define to print only Put lines


Option 1:


{{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,525^BCN,,Y,N

^FH\^FD$WHSLicensePlateLabel.LicensePlateId$^FS

}}

{{Row Table=WHsWorkLine_1 StartY=148 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.LineNum$^FS^CI27

^FT250,$position.YPos$^A0N,42,43^FH\^CI28^FD$WHSWorkLine_1.WMSLocationId$^FS^CI27

}}

{{LabelEnd

^PQ1,0,1,Y

^XZ

}}

Option 2:

{{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

}}



Make sure that network printers setup.


Specify date, time, and number formats

To set the formats of date, time, and number values that are shown in a label layout, open the Label layout page, select or create a layout, and set the Date, time, and number format field to the language that uses the formats that you want.

Set up license plate label routing

To specify the license plate label layouts that are used and where they are 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. In the Work order type field, select Purchase orders option.

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

4. On the header of the new routing record.

5. 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. 



Set license plate labels to be printed automatically when purchase orders are received

If you want a license plate label to be printed automatically each time that a new purchase order is received, you can configure eigher work template with Print step or mobile device menu item.

Option 1

1. Go to Warehouse management > Setup > Work> Work templates.

2. In the Work order type field, select Purchase orders option.

3. On the Action Pane, select Edit.

4. Select the work template that license plate labels should automatically be printed for. If you're working with sample data, select the row where the Work template ID field is set to 24 PO Receipt.

5. Select New in the Work Template Details section.

6. For the new work template line, set the following fields:

○ Work type – Select Print . 

○ Work class – Select Purchase.

7. Select Save. 

8. Use Move up button to place new line between Pick and Put lines.

9. Close the page.

 Option 2 (most preferable way of doing it)

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

2. Select New.

3. Create a record that has the following settings:

○ Menu item name: Mixed

○ Title: Mixed LP receiving

○ Mode: Work

○ Work creation process: Mixed license plate receiving

Print label : Yes


4. Add the new mobile device menu item to the menu

5. Go to Warehouse management > Setup > Mobile device > Mobile device menu.

6. Select Inbound menu.

7. In the tree, select the menu item that you created before.

8. Select Edit.

9. Select the arrow to add the menu item to the menu.

10. Select Save.

11. Close the page.


Run a scenario to print license plate labels

Create PO with 2 items



In this scenario we will be receiving items 3 times, and for each time will be changing document routing layout to see the difference between layouts. 

Log in to mobile device emulator

https://xxx.operations.dynamics.com/?mi=action:WHSWorkExecute&cmp=USMF

Select Mixed LP mobile device

Scan LP number

Scan PO number

Scan Item 1 and Qty 1

Scan Item 2 and Qty 2

Select LP complete


Select OK

License plate label will be printed. In this scenario we selected first layout where we print only license plate label details from the license plate table. 


Item is blank, because Item on LP label is actually blank since contains multiple items.

Let's select the second label layout in the Routing to see how it looks. 

We will be using the same PO, just create another LP in the mobile device


LP printed. Now we see that additional information is getting printed (order number) from the purchase order table. 

And Label generated as below

And now let's check the last layout where we have repetitive header with license plate ID and rows from the license plate items.



And license plate label is generated as below.

Note: If for some reason label is not printed, make sure you set the right query on the Label Layout data source and it does not contain criteria that are not valid for your scenario.

Another point worth mentioning is that you might notice different behavior for printing LP label by using Print label option on mobile device menu item or if you are using Work template line step Print. 
The reason because license plate labels generated differently. 

In case of Print label on the mobile device menu item: There will be 1 LP label generated for multiple items within the same LP and Item number will be blank on the label.
In case of Print step on the work template: There will be as many LP labels generated as many items within the same LP and Item number will be set for each label.

That's it for today!