Recreate your Replenishment template lines after installing CU9

CU9 for Dynamics AX 2012 R3 contains several updates for functionality in the Warehouse management module. One of them is KB 3051622 “Warehouse Management (WHS) Replenishment performance issue”. If you’re using replenishments in Dynamics AX 2012 R3, it’s worth checking out the LCS page for this fix, because it goes into some detail about the changes that this hotfix brings.

One change relates to the use of the ‘Replenish only fixed locations’ tick box on the replenishment template line. I can’t imagine how you would be using replenishments and NOT have this field ticked, so I think it will be relevant to everyone using replenishments. With this hotfix installed, when ‘Replenish only fixed locations’ is ticked, the ‘Select locations’ button becomes greyed out:

ReplenishOnlyFixedLocations

If ‘Replenish only fixed locations’ is ticked, the ‘Select locations’ button is unavailable

To compensate, the ‘Fixed product locations’ and ‘Locations’ tables are added to the ‘Select products’ query:

ProductQuery

The Product query is extended to the ‘Fixed product locations’ and ‘Locations’ tables

(And, if you’re using Product variants, then the ‘Fixed product variant locations’ table is added to the query).

This, according to the description of the hotfix, improves the performance of the replenishment functionality. In my test environment, which has CU9, I haven’t noticed a problem with the performance of the replenishment job. But I have seen a customer’s test environment (with an extraordinarily large number of items and locations/fixed locations) where the replenishment job was taking over half an hour to create a replenishment for ONE item. So I have high hopes for the performance part of this fix!

An important point is described on the hotfix’s LCS page: “Note: When you apply this hotfix, any existing replenishment template lines that are configured with “Replenish only fixed locations” checked must be deleted and recreated to prevent errors during processing.

This is because the query that was saved against each replenishment template line is now invalid. If you don’t recreate the query, when you run the replenishment job, you’ll get the error “Error executing code: Wrong argument type for function.” and no replenishment work will be created:

ErrorexecutingcodeWrongargumenttypeforfunction

The replenishment job will throw an error

To eliminate the error, the advice says to delete the replenishment template line and recreate it. I find that you don’t have to delete the line, but you do have to delete the query. The easiest way to do this on one line is to un-tick and re-tick the ‘Replenish only fixed locations’ tick box. Then you can re-configure the query and you’re away.

If you managed to import your replenishment template lines, then you’ll want to delete them, adjust the import to build an ever so slightly different query, and reimport them. If you created your replenishment template lines by hand.. well, I hope you don’t have too many. But either way, you’ll need to factor this exercise in to any CU9 upgrade plans that you have.

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s