Thursday, June 29, 2023

Testing WMS labels in Dynamics 365 SCM: Virtual ZPL printer, Local file and SCM External service

As you might know the existing  Chrome ZPL Printer extension is not supported any more. Within this blog post I would like to provide other ways of printing labels in Supply Chain management.

Virtual ZPL Printer

An Ethernet based virtual Zebra Label Printer that can be used to test applications that produce bar code labels. This application uses the Labelary service found at http://labelary.com.

The idea is pretty much the same as it was before with Chrome extension. 

You need to perform the following to make it work:

Local file


You need to perform the following to make it work:
  • Create or update any existing printers. To update the printer properties, select Print Properties.
  • Select the Ports tab and select Add Port.
  • Select Local port and select New Port
  • For the port name, enter a file name: C:\Labels\Zebra.TXT
  • Run the installation program for the Zebra Printer Drivers (ZD220/ZD230 Desktop Printer Support | Zebra) and select a printer you would like to use, for instance ZDesigner ZD220-203dpi ZPL printer). Select the port you have just created and Finish the installation.

Now when Zebra.TXT is updated with printed label, you can open txt file, copy the values and paste it into Labelary Online ZPL Viewer

SCM External services

If you want to get around the pain of setting up DRA for label printing, with new feature available since 10.0.33 you can use External services to test your label printing.

You need to perform the following to make it work:



  • Set up External service instance - make sure you put something into the authentication secret, doesn't matter what:


  • Set up Label printers:


  • Set up Label layouts. For the simplicity of the demonstration, I am going to use custom label layouts feature to print location labels. 



 Let's print the label from the locations: 


And the results (custom label of location 10000 to Printer2) :

 

It is super convenient to set up and use it. 
That's it!

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!

Monday, February 13, 2023

Vendor bank account change proposal workflow in Microsoft Dynamics 365 Supply Chain Management

In this blog post I am going to walk through the new Vendor bank account proposal workflow feature. 

The vendor bank approval workflow in Dynamics 365 Supply Chain Management ensures that bank data submitted by suppliers is secure, financially compliant, and protected against fraud. Businesses can evaluate and approve any incoming changes to a supplier's bank account information and make sure the provided bank details meet their organization's standards and policies. This helps reduce the risk of fraud by detecting and preventing unapproved changes. 

When you enable the vendor bank account workflow, any changes submitted for specific bank-details fields will be sent through the workflow for approval. You can configure approval triggers and decide whether to invoke the approval workflow when a supplier’s bank details are created, changed, or both.

Enable the feature

Enable Vendor bank account change proposal workflow feature in the Feature management workspace


Set up the vendor workflow
Before you can use the workflow feature, you must enable it.

Go to Accounts payable > Setup > Accounts payable parameters.
On the General tab, expand the Vendor bank account approval FastTab.
  • Set the Bank account approval (create) option to Yes to send changes to the workflow upon bank account record creation.
  • Set the Bank account approval (update) option to Yes to send changes to the workflow upon bank account record update.
In the Data entity behavior (update) field, select the behavior that should be used when data is imported:
  • Allow changes without approval – The data entity can update the vendor bank account record without processing it through the workflow.
  • Reject changes – Changes can't be made to the vendor bank account record. The import will fail for the fields that are enabled for the workflow.
  • Create change proposals – All fields will be changed except the fields that are enabled for the workflow. The new values for those fields will be added to the vendor bank account as proposed changes, and the workflow will be started automatically.
In the list of vendor bank account fields, select the IsEnabled checkbox for every field that must be approved before the changes can be made.
Go to Accounts payable > Setup > Accounts payable workflows.
Select New.
Select Workflow approval for proposed vendor change.

Set up the workflow so that it matches your approval process. The Workflow approval for proposed vendor bank account change workflow approval element will apply the changes to the vendor bank account.




Add vendor bank account information and submit to the workflow for approval

If Bank account approval (create) option is enabled in the Accounts payable parameters, when you create a vendor bank account record and save the record, Workflow button will be available. 

Go to Accounts payable > Vendors> All vendors.
On the Action pane, select Vendor tab and select Bank accounts option in the Set up section.
Select New to create a new bank account.
Fill in all required fields.
Select Save.


Select Workflow button and chose Submit.
Bank account must be approved before it can be used throughout the system.


Change vendor bank account information and submit the changes to the workflow
When you change a field that is enabled for the workflow, the Proposed changes page appears. This page shows the original value of the field and the new value that you entered. The field that you changed is reverted to its original value. A status message will inform you that your changes haven't been submitted.




Every time that you change a field that is enabled for the workflow, that field is added to the list on the Proposed changes page. To discard the proposed value for a field, use the Discard button next to the field in the list. To discard all changes, use the Discard all changes button at the bottom of the page. Select OK to close the page.

After you have at least one proposed change, two additional tabs appear on the action pane: Proposed changes and Workflow.

Select Proposed changes to open the Proposed changes page and review your changes.

Select Workflow > Submit to submit the changes to workflow.



Review status filed:
  • Draft - record has been created and has not been submitted for approval. All fields are editable in this state
  • Approved - record has been approved
  • Approved, changes not submitted - previously approved record has been changed but not yet send for approval.
  • Approved, pending changes - changed record has been submitted for the approval

The workflow follows the standard workflow process. The approver is directed to the Vendor bank account page where the changes can be reviewed on the Proposed changes page and then select Workflow > Approve to approve the workflow. After all approvals are completed, the fields are updated with the values that you proposed.

That's it!