Wednesday, December 28, 2016

Configuration tip: Warehouse mobile devices portal Native application in Azure Active Directory

Setting up the Warehouse mobile devices portal is a relatively simple process, and is described in detail on the corresponding wiki:

However, now and again I would get complaints around the authorization process not working properly, or asking for interactive login, both of which shouldn't be necessary for the authorization method used by WMDP.

So in this post I would like to give a small configuration tip that prevents the below error message:

Error: "The user or administrator has not consented to use the application with ID ''. Send an interactive authorization request for this user and resource.

The reason this error is shown is because the Native application setup in Azure for WMDP has access to resources that require the Azure admin to consent to that first.

WMDP app is configured to allow access to AAD resources
As you can see, some of the resources WMDP app has access to require prior Admin consent.


When configuring the Native application for WMDP in Azure, only give it permissions for the Microsoft Dynamics ERP resources.

This will ensure you don't get unexpected errors when trying to connect to WMDP.

Happy Holidays to all of you!

Stay tuned for more posts next year and subscribe if you haven't already to get updates on the latest tips and tutorials for Dynamics 365 for Operations aka Dynamics AX aka Axapta :)

Thursday, November 24, 2016

Tutorial Link: Handling exceptions the right way in X++

Michael and I have been working the last couple of weeks to uncover some of the difficult to repro bugs in Warehouse management code, and one of the things we discovered is a pattern which can lead to very unpredictable behavior when used incorrectly.

I encourage all of you to read it and make sure all of your code is up to standard.


Monday, November 14, 2016

Tutorial: Location directive failures - Common mistake #2 - Batch enabled

This is a blog in a series about Location directive failures.
You can find the original blog post here:
Tutorial: Location directive failures - Common mistake #1 - Multi SKU

Common mistake #2 - Batch enabled location directive line

Very often when new people start working with the Advanced warehousing solution, they struggle to notice the little check-box on the location directive lines called Batch enabled. However, it is very important when dealing with batch-tracked items in outbound flows like Sales order processing.
Here's the typical scenario when users try to set up the location directives for the first time:

They created all the necessary Pick and Put directives, decided how they want to go about the lines and different units of measure, and now they are defining the actions, which in turn means defining the query for locations to consider for pick-up/put-down.

Here's a typical and valid location directive configuration:

Valid location directive setup without Batch enabled set
After that they create a sales order, reserve the inventory, release the order to warehouse and are surprised to get the following warnings:

Release to warehouse failed for batch-tracked item P0004
Sadly, there is no indication in the work creation log that would explain why the release failed apart from the fact it could not allocate the item.

But the reason is - the location directive action was not considered a match, because only ones with Batch enabled were considered for this item.
So let's change that and try again.

Valid location directive setup with Batch enabled set
Note, that this modifies the query you can use for selecting which locations should be considered, adding the Batches table to the query, so you can, for example, select to only consider locations, where there is on-hand for a batch that is to expire more than 20 days from now.

Defining the location directive action query for batch enabled action line
Once the setup is changed, let's re-release the sales order (to show the exact same flow as before, I deleted the load line / shipment that were created before):

Release to warehouse succeeded for batch-tracked item P0004
As you can see, now all is great, and the created work looks like below, correctly picking up the items from a Picking location we defined in the location directives:

Work created for picking sales order 000785

What this means for your configuration

What this virtually means is:
  • If you do not track batches on your items in the selected warehouse, you can ignore this setting completely
  • However, if you do track batch numbers, you will most probably want to have 2 action lines for the same location directive line every single time, one for batch-tracked and one for non-batch tracked. 
    • That might be exactly what you want if you want to keep track of your batch-tracked items (perishable goods) separately from non-perishables.
    • If not, however, then it gets pretty inconvenient, and I have no knowledge of why the original implementation was done this way (Maybe somebody from BHS can answer in the comments), but we do not have any plans to change this in the near future.
Note, that for inbound flows this check-box is not considered and is not even enabled in setup. 

What's next

In the next blog post of this series we'll talk about Disposition code and how that impacts the receipt flow

Friday, November 04, 2016

Tutorial Link: Executing outbound work with pending demand replenishment work


In Dynamics 365 for Operations we solved one of the long-standing complaints, where large work orders could not be started because of pending replenishment. A typical workaround then would be to artificially broke down the replenishment lines into a separate work order, so workers can do the picking for the majority of stuff. Then of course you'd get into problems with merging the two (or more) Target LPs onto one (which we now also support - see my previous blog post).

Read the feature description and and walk through a sample flow on our SCM blog:

For those on AX 2012 R3

We have not back-ported this feature to AX 2012 R3 yet. We have it in the backlog, but no ETA for when that will happen.


We'd love to hear your feedback on this feature if you are going to use it in your production environments.

Thursday, November 03, 2016

Tutorial: License plate consolidation in Dynamics 365 for Operations (1611)

Introduction to scenarios

The Microsoft Dynamics AX Warehouse management module supports a number of advanced scenarios for warehouses, thanks to the flexibility offered by the concept of Work and work lines, which take care of any and all operations in the warehouse. The system has a number of complex configuration possibilities that determine how work is created. At the same time, AFTER it has been created, work is fixed and any necessary changes require a lot of manual supervisor interventions, or, in many cases, are not possible at all.

Imagine the following two scenarios:

Scenario 1

A customer orders a number of items from us. Based on our work template setup, multiple work orders are created to pick these items from the warehouse, say, some are picked from a cooled area, while the rest is coming from the regular picking area. All of the items are placed into a staging area location after picking, to be loaded on a delivery truck.

Scenario 2

A customer orders a number of items from us. A sales order is created in our system, released to warehouse, so work is created. The picking commences, and the goods arrive at the staging location, but are not shipped the same day, because the truck to pick them up only arrives tomorrow. The same evening, the same customer orders more items from us. Correspondingly, a new sales order is created and released to warehouse, creating more work. The pick is completed, and the goods are placed in the staging location ready to be loaded the next day. The warehouse manager decides to ship both shipments on the same truck tomorrow, adding the second shipment to the same load that contains the first shipment.

In both scenarios, we now have two license plates on the same load, that are going to the same customer, sitting in the same location. When the truck comes, they will need to be loaded separately one by one, even though in many cases, the items would fit perfectly fine on just one license plate.
Until now, the warehouse worker had no way to merge the two license plates together to ship everything on just one license plate, at least in the system (probably does happen outside of the system already).

In the Fall release of Microsoft Dynamics 365 for Operations (1611) we have added the ability of consolidating items on a license plate with items on another license place within the same location, where there is work behind one or more of the license plates. This is supported by a new type of mobile device menu item with Indirect Activity code “Consolidate license plates”.

Scenario walkthrough

All you need to do to enable this mobile device flow is create a new mobile device menu item that looks like the screenshot below:

LP consolidation mobile device menu item
For the scenario walk-through I have created two sales orders as below:
  • Sales order 000781 for customer US-001, which contains two lines:
    • 10 ea of item M9200 from warehouse 51
    • 15 ea of item M9201 from warehouse 51
  • Sales order 000782 for customer US-001, which contains one line:
    • 7 ea of item M9201 from warehouse 51

Sales order 000781 was released to warehouse first, before 000782 existed, resulting in the creation of Shipment USMF-000008 on Load USMF-000010.
Sales order 000782 was then added to the same Load, and also released to warehouse, resulting in the creation of Shipment USMF-000009.

The following picking work was created for these 2 shipments:

Work order details
This scenario corresponds directly to Scenario 2 I described above.

Now, for both work orders the initial picks are executed (one or different workers), and for both the goods end up at the STAGE location, awaiting loading, as shown below:

Work order details after initial pick was executed
From here on, license plates TLP_001 and TLP_002 follow the same path in the warehouse, more specifically they both will be picked up from STAGE and loaded into the truck at BAYDOOR location.

If the warehouse worker at the outbound dock makes the decision to consolidate these two license plates (currently, this is only an ad-hoc decision by the worker, planned consolidations are not supported), he can do that using the above mobile device menu item. Here is how the flow would look on the mobile device:

Step 1

You are presented with a screen, where you need to enter the Target LP. This is the License plate, where the items will end up after the consolidation.
  • This can be a new License plate. There is no way to print this new LP Tag from this screen at this point, however, so keep that in mind.
  • This can be an existing empty License plate. This could, for example, be useful, if you want to merge the contents of 2 half-pallets onto 1 empty euro pallet. Another case is if the pallet, where the items currently are placed, is damaged or “unshippable”.
  • This can be an existing full License plate, which is set as a Target LP on an existing work order with Work order type “Sales order” or “Transfer order issue
  • This should not be work that has a Container Id on the header or any of the lines.

LP Consolidation, Step 1

Step 2

Target LP was accepted, and now you are asked to scan in the LP you want to merge onto the Target LP.
  • LP to merge needs to be a target license plate for an existing work order of Work Order Type  Sales Order or Transfer Order Issue.
  • The LP to merge needs to be in the same location as the Target LP, and it cannot be the final shipping location (that’s too late, since goods are already Picked at this point).
  • The LP to merge needs to relate to the same Load as the Target LP
    • It should also have the same delivery information, if there are more than one shipment involved. Namely, the Delivery name, Customer account, Delivery address and Mode of Delivery should match.
  • The remaining steps in the flow for both work orders being merged need to match. This is done so we ensure all relevant steps are executed, for example, that the labels are printed at the appropriate time in the flow for all consolidated items.
  • This should not be work that has a Container Id on the header or any of the lines.
LP consolidation, Step 2

Step 3

When LP to merge is accepted, the worker is presented with a confirmation screen, that shows a summary of all items on that license plate. This is to help ensure that he scanned in the right LP before the actual consolidation of the two work orders happens.

In the case below, there was only one item on TLP_002, with a total quantity of 7.00 ea

LP consolidation, Step 3

Step 4

Once the worker confirms by pressing OK, the consolidation is executed, merging the two work orders together and moving all items from LP to merge to the Target LP.

The worker gets a confirmation message that the license plates were merged, and is presented with a screen where he can continue scanning in any following license plates to merge onto the Target LP.

LP consolidation, Step 4

Here is how the work looks after consolidation happens:

The work related with LP to merge, in our scenario walk-through that is TLP_002, is now marked as Closed, and by reviewing the work lines you can see the final Put step was changed, so it now points to STAGE location instead of BAYDOOR. The only thing that changed is which license plate it is put onto, namely TLP_001 instead of TLP_002.

Work order details after LP consolidation - Merge From work
The work related with Target LP, in our scenario walk-through that is TLP_001, is still In progress, and you can see the quantities on the remaining Pick/Put pair were increased accordingly with the quantity from work related with TLP_002.

Work order details after LP consolidation - Consolidated work

If you review the corresponding work transactions, you will see that an extra transaction corresponding to the load line for M9201 from sales order 000782 has been added to the Pick line to represent the additional Pick quantity.

Accordingly, the inventory transactions also reflect the fact items were moved from TLP_002 to TLP_001, and the new work reservations are based on that as well.

Mobile device menu item configuration option “Cancel remaining origin work lines

We expect most companies to run with this configuration option turned on. It comes into play in the following situation: When there are more subsequent staging steps on both work orders, this configuration will enable you to forfeit any of the steps on the work being merged from, so the steps on the consolidated work will be the ones executed for all merged items. That specifically means that any “extra” steps on the work being merged will be Cancelled.

If there are some specific reasons why all work steps need to be executed for the merged work order separately, you should not enable the configuration option. As a result, however, you will not be able to consolidate this LP to another one.

See a more detailed explanation in the Help Text for this configuration on the menu item.

For those behind on updates :)

This feature has been back-ported to Microsoft Dynamics AX 2012 R3.
You can download it from KB number 3190562

Let us know what you think of this new feature!