Monday, July 14, 2014

Announcement: Warehouse management system implementation guide for Microsoft Dynamics AX 2012 R3 is now available for download

If you have been following my latest posts on the new Warehouse management module in Microsoft Dynamics AX 2012 R3, and are curious to find out more, you should check out the new implementation guide that has been released today.

You can download it through the following link:
http://www.microsoft.com/en-us/download/details.aspx?id=43660

If you have any feedback on the guide itself, or on the information missing from it, feel free to reach out through comments to this post, and I will convey the message appropriately.

Enjoy the read!

Saturday, July 12, 2014

Walkthrough: Cancelling put-away work in Microsoft Dynamics AX 2012 R3

In the new Warehouse management solution shipped with Microsoft Dynamics AX 2012 R3, any movement of inventory in the warehouse would normally have a corresponding piece of work registered together with work lines detailing where the warehouse workers should pick the goods from and where they should put them.

Therefore, it is no surprise, that when you receive a purchase order (or any other inbound order, like a transfer or a return) through the new mobile device portal, work will be created to put away the goods into a storage location (or QA or whatever you set up in your location directives). The closest analogy for those who know the existing WMS II solution that I have is the pallet transports used in conjunction with arrival journals, where goods get physically registered at the inbound dock, and a pallet transport is created to move the pallet to the location found based on the put-away rules selected on the arrival journal line (Check picking/bulk locations). The new solution allows a much better level of control over all the warehouse operations.

What I want to talk about today is the cases where the created work is not satisfactory and needs to be modified / canceled.

There are three scenarios I would like to mention:

  1. The put-away location needs to be changed, because the suggested location is unavailable or another location is simply preferable.
  2. The put-away work needs to be canceled, where a decision about the put-away location will be taken later
  3. The put-away work needs to be canceled, because the receipt was incorrect to start with



1. If the warehouse worker doing the put-away is an experienced user who is allowed to make on the spot decisions about modifying the suggested flow of inventory, he can override the put location, storing the goods away into a different location at the warehouse.

This is controlled by a policy on the setup of warehouse workers, accessible through Warehouse management \ Setup \ Work users \ Worker, as shown in the below screenshot:

Work user policies
Allow work user to override put location when executing work

2. Another way to achieve this would be to cancel the pending put-away work, ensuring that workers do not see it on their mobile devices as something they should execute now, and creating a manual movement to a location of choice when the decision where to move the goods is made. This would be a decision done by a receiving clerk / warehouse manager. 
It could also be due to some extra paperwork or inspection being done on the items, where it's yet unclear if the system-selected put-away location is OK. (If it is, the warehouse manager could simply block the work until a decision is made, which would prevent workers from executing on it)

In order to cancel the work, simply press the "Cancel work" button on the Work details form (or corresponding list page). See a step-by-step walk-through below.


3. Now, sometimes, due to input errors or other factors, you would want to not only cancel work, but also make sure the goods are not physically at the warehouse either, reverting the entire receipt as if it never happened (you'll still have a trace of it happening). This could, for example, be useful if the receiving clerk was logged in to a different warehouse and accidentally received a purchase order to that warehouse instead of the one the user was actually at (Note: Not possible in RTM, need a corresponding hotfix installed).

This additional step of unregistering the items is controlled by a policy on the Warehouse management parameters, called "Unregister receipt when canceling work".

Warehouse management parameters
Warehouse policy - Unregister receipt when canceling work


Here is a step-by-step description of the cancel workflow:
  • Create a new purchase order for a WHS-enabled item to a WHS-enabled warehouse
Purchase order details
Purchase order with one line for a WHS-enabled item to a WHS-enabled warehouse
  • Using the mobile device portal, register the receipt of the above purchase order (Hint: use a mobile device menu item with Mode = Work and Work creation process = Purchase order item receiving)
PO receipt
Purchase order receipt on Mobile Device Portal

  • View the inventory transactions for the above purchase order, and confirm that they are registered at the default receiving location at the selected warehouse (Note: It is the warehouse the user was logged in to when doing the PO receipt from the mobile device)
Inventory transactions
Purchase order inventory transaction with Receipt status = Registered

  • Open the created put-away work (Hint: You can navigate directly to the new piece of work from the purchase order details form, by clicking on Work details button in the Lines section), and click on Cancel work.
Work details
Canceling put-away work

  • Confirm that Work status of the work header and lines has changed to Canceled, and (depending on the above warehouse management policy) the purchase order line inventory transaction is back in Ordered receipt status. 

Note: This policy is currently implemented only for Purchase orders and Transfer order receipts. It will not come into play when registering the receipt of a return order or any other inbound order types.


I would also be interested in hearing your scenarios, which require canceling put-away work, and the reasons behind them. So if you use this functionality for reasons other than described above, please leave a comment below.

Thanks

Friday, June 27, 2014

Tool: Update: Automated way of setting up the Application Integration Framework

In November 2009 I have posted a blog post that presented a tool I wrote for quickly setting up AIF for testing purposes. You can find the original post here.

I have since received requests to upload a new version of that tool, that would work with AX 2012 R2.
Well, now, only 5 years later :), here is the updated tool, that works with AX 2012 R3 (Note: should also work with R2, but I have only tried it on R3).

You can download the xpo from my OneDrive.

To briefly describe the changes, as compared to the version from AX 2009:

  • There is no longer a concept of endpoints in AX 2012. Instead, there is a concept of inbound and outbound ports, so I have replaced the corresponding creation so that 1 inbound and 1 outbound ports are created, both using the File System Adapter, and dropping the files in a location on drive D. Note, that I have not done anything in terms of ensuring AOS has access to that folder, so if that is not working, ensure the right access is granted.
  • Channels are now created implicitly for each port, depending on the Adapter class you select.
  • I am not explicitly creating data policies now, which seems to mean all XML fields are enabled. If you want to restrict the schema to only certain fields, you will need to deactivate the port, and modify the data policies accordingly manually.

Note: Only services for Invent*, EcoRes* and WHS* prefixes are registered, and only their service actions are added to the ports. If you need additional actions in your tests, modify the code and add the extra prefix.

I have tested that the WHS ASN service works after executing the tool, both for inbound and outbound, and will describe the use of this service in a blog post on the SCM msdn blog shortly. If you however find stuff I have missed, let me know.

Thanks

Saturday, May 10, 2014

Walkthrough: Fixing error "Incorrect Mobile device display settings..." on the mobile device when trying to sign in

All the people who have tried the new Warehouse management mobile solution by now have probably hit the issue below and were confused about the error message displayed, as well as how to fix this.

The scenario is simple:

1. Install and Configure the Warehouse Mobile Device Portal through setup.exe.
As part of this step, you will need to specify a domain account to use as the identity of the IIS application pool that is used to run the Warehouse Mobile Device Portal (WMDP in short).

Warehouse Mobile Device Portal Installation Wizard

2. Completing the installation process will create a site in IIS. You can access this site, and it will open the WMDP home screen. If you now click on Log on to the mobile device, you will get the below error, if the domain account from the IIS app pool is not added as a user in Dynamics AX, or if he does not have sufficient privileges to run the mobile device portal.

WMDP error - insufficient privileges to connect to AX

3. After adding the user to AX and assigning the appropriate roles to him, you can try logging on to the mobile device again. Now, you might get a different error, like below

WMDP error - display settings are not configured

If you read the error message, you can see it complains about the mobile device display settings not being configured. Well, let's check them out, under Warehouse management > Setup > Mobile device > Work user mobile device display settings
As you can see on the below screenshot, I have them defined, and the setup is valid. Hmm, what is the above error about then?

Work user mobile device display settings

Root cause:
The problem is actually with the default company set for the above AX user. By default the portal tries to connect to the company set as the default for that user, and thus cannot find the display settings, since they are created per company and don't exist in DAT (most probably).


4. After assigning a valid default company to the AX user, the domain account of which is running the IIS app pool for WMDP, we can try logging on to the mobile device portal again. Now we can see that we reach the Sign in screen, which means all is good in the world. :)

Warehouse Mobile Device Portal Sign In page

Hope that helps avoid initial confusion when trying to use the mobile device portal!

Friday, May 09, 2014

Walkthrough: After setting up a work-related Mobile Device menu item the user is constantly logged off when trying to use it on the device

Hey guys

As some of you might know, I was part of the team that released the new Warehouse and Transportation solution as part of Microsoft Dynamics AX 2012 R3.

As with any first version of the product (and this is a huge solution), there are certain issues that we simply did not have time to address. Some of them are however pretty hard to figure out the root cause for, unless you spend time debugging or know where to look to start with.

When setting up Mobile Device menu items to use at the warehouse, you have a couple of possibilities for what type of menu item it is going to be. Specifically, it can be a non-work related activity, a work-related activity, which results in creation of new work, or processing of existing work.

I won't go into the full description of how to set this up - you can easily find this information on technet, MSDN, etc.

Here's the short version of the flow, and the problem you might experience.

  1. Navigate to Warehouse management > Setup > Mobile Devices > Mobile device menu items
  2. Create a new menu item, and fill in the fields. Select Mode = Work, Use Existing Work = false.
  3. Select Work creation process = Load item receiving
  4. Save the record. It should look like below
  5. Add the created menu item to one of the available mobile device menus.
  6. Log in to the mobile device with any available work user and navigate to the menu item created above.
Mobile device menu item
The created Mobile device menu item

Possible result of executing the above steps:
Sometimes, without any explanation, the user is consistently logged out of the mobile device, when trying to use the newly created menu item.

Root cause:
The problem can be that when creating the menu item, you accidentally selected an Activity code, changing its value from None to the next value on the list, which is Log off. This can happen quite easily, especially if you normally use the keyboard and not the mouse to click around. 
Now, even though you later changed the Mode to Work, the system still remembers the selection in the Activity code, and will apply it when using the menu item, resulting in a log off.

That's quite annoying, but also very easy to fix, just flip Mode to Indirect, revert the Activity code value back to None, and flip the Mode back to Work. All your settings for work creation setup should stay intact. 


To finish off, I just want to encourage all of you to install Dynamics AX R3 and try out the new modules, and send us feedback through Connect, Yammer, or comments on the SCM blog or here.

Thanks


Monday, May 05, 2014

Q&A session: Working with UtcDateTime from X++

There were a couple questions asked in the post I wrote a while back about the use of UtcDateTime in AX.

Question 1:
Hi. how can put date in a field utcdatetime?
Answer:

The method newDateTime from class DateTimeUtil can be used to accomplish this, as it takes the date and time parts in separately as arguments, followed by the TimeZone enumeration in case a timezone offset needs to be factored in. Otherwise the UTC timezone will be used.

static void CreateUtcDateTimeFromDate(Args _args)
{
    date locDate = mkDate(5, 3, 2014);

    info(strFmt("Date converted to DateTime, with 0 for time and no timezone offset = %1",
        DateTimeUtil::newDateTime(locDate, 0)));
}

The result of executing this job would look like below:

Date converted to DateTime, with 0 for time and no timezone offset = 3/5/2014 12:00:00 am


Question 2:
Hi...Can you please tell the difference between UtcNow() and getSystemDateTime(). Both are returning GMT time only. But where as in msdn they described differently...
Answer:

The difference is you can "fix" the systemDateTime either through the API (DateTimeUtil::setSystemDateTime()) or through the Tools in the Dynamics menu, as shown on the screenshot:

Dynamics AX session date and time
Session date and time dialog

static void DifferenceBetweenUtcNowAndSystem(Args _args)
{
    info(strFmt("getSystemDateTime = %1", DateTimeUtil::getSystemDateTime()));
    info(strFmt("utcNow = %1", DateTimeUtil::utcNow()));
}

So, after having fixed the system datetime, the output from executing this job would be like below:

Info Message (11:01:28 pm) getSystemDateTime = 5/1/2014 12:00:00 am
Info Message (11:01:28 pm) utcNow = 5/5/2014 09:01:28 pm

If the system date time is not fixed, it will return the local system datetime, pretty much like utcnow.

Note, that msdn actually also describes a slight difference in how utcnow works - it seems it always runs on the server, so always returns the AOS datetime. I can't test it right now because only have a dev.setup with everything on 1 box. Once I get a 3box one, I will update this post with a confirmation.

Q&A session: Working with MorphX project nodes from code

I had some spare time today, so started answering some of the comments I had through the blog and through e-mail. I decided I'll just open up a new section on my blog, called Questions and Answers, in which I will slowly answer the questions from my backlog:

Question (related to post about the DEV_CreateNewProject tool for AX):
So could create ConfigKeys Macro and I wanted, and could throw them into the project that was created, but I can not throw them within their respective nodes, so they are loose in the project, you can help me put them within your nodes?

To summarize, Gustavo wanted to create some AOT elements from code (specifically, configuration keys and macros), and add them to a new project into respective groups, similar to how it is done in DEV_CreateNewProject tool.

I wrote a small job that does that, and can be downloaded from my OneDrive. The code is also pasted and explained below:

static void Tutorial_CreateProjWithGroupAndElement(Args _args)
{
    ProjectListNode     treeNodeProject;
    ProjectNode         upgradeNode;
    ProjectGroupNode    child;
    MacroBuild          macro;
    #AOT

    str projName = @"Project01";
    str groupName = @"macroGrp";
    str macroName = @"macro01";

    treeNodeProject = SysTreeNode::getPrivateProject();
    treeNodeProject.AOTadd(projName);
    upgradeNode = treeNodeProject.AOTfindChild(projName);
    upgradeNode = upgradeNode.getRunNode();

    upgradeNode.AOTadd(groupName);
    child = upgradeNode.AOTfindChild(groupName);
    child.projectGroupType(GroupNodeType::Macros);

    macro = new MacroBuild(macroName, true);
    macro.addSource(@"isConfigurationkeyEnabled(configurationkeynum(WMSAdvanced))");
    macro.save();

    child.addUtilNode(UtilElementType::Macro, macroName);

    upgradeNode.AOTsave();
}

  • SysTreeNode class is used to retrieve the object for the root of the Private projects node. This class contains a number of interesting methods for anyone who wants to navigate and manage AOT nodes
  • Standard AOTadd and AOTfindChild methods are used for first creating and then loading the contents of the node into a TreeNode object for processing.
  • getRunNode is used on the project node so that it is not just loaded for processing, but also opened in a new window to show the result to us after executing the job
  • MacroBuild class is used to creating new Macros, and is similar to a ClassBuild that I described previously
  • addUtilNode is the key method Gustavo was missing, and allows to add the macro created to the project group node. 
  • AOTsave() is used to persist all the changes done to the project as well as the new macro.


You can see the results immediately after executing the job.

Sunday, December 15, 2013

Tool: Update: User preferred startup menu for AX 2012


I have over the last year received a couple mails and comments from people, asking to publish an update for the below tool for AX 2012

http://kashperuk.blogspot.dk/2010/04/tool-user-preferred-startup-menu-for.html

There aren't really any serious changes to it as such, just some minor things.
Again, note, that there are a few changes to some of the existing "high profile" AOT elements, so please read through the description of changes in the above post.

Download updated xpo