Wednesday, January 28, 2015

Retail Modern POS (mPOS) installation and setup via AX 2012 R3 CU8 demo machine

When you open the AX 2012 R3 CU8 machine, you'll notice that you cannot see the Retail Modern POS (mPOS) application (Figure 1 below). Additionally, if you spend time trying to load it onto the administrator account's Windows 8 profile, you will not be able to run it. The application was specifically designed to not allow the user to run this app. So you will have to log into a different user to access it.

So the whole purpose of this post will be: 'How can I get into the mPOS'.

OPTION 1 - Use an existing user with the mPOS installed and configured
There is a user setup out of the box for this. Literally you can spin up the machine from Lifecycle Services (LCS) and start getting into the mPOS in this version. In previous versions, there were issues but it seems to have been ironed out now.
  1. Log into the RDP session as contoso\Emmah, with the 'standard' AX password with the '@' sign we all know and love .
    1. You will now see a number of POS registers on the desktop. If you navigate to the Start screen, you will see the Retail Modern POS (Figure 1 below) installed.
  2. Click on the Retail Modern POS application
  3. Enter the Device activation information in Figure 2 (or whatever yours is but this is from the demo)
  4. Click 'Activate'. It will take ~15 seconds to activate as seen in Figure 3.
  5. You are in the modern POS now!
Something interesting happened for me testing this route though. I was in the mPOS and poking around very casually. Then got up to get coffee, started documenting this in this blog post and noticed that the screen flashed and the app apparently crashed or something. Now the app can't be found anywhere. That's fun. So onto the second option I guess...

Figure 1 - The Retail Modern POS application
Figure 2 - The mPOS settings needed to log in

Figure 3 - The mPOS processing and activating the device
OPTION 2 - Create a new user, install the mPOS, configure, and go.
I wanted to use my own username instead of Emmah and do the configuration from beginning to end. This includes installing the mPOS on the machine for the user. Since the Emmah mPOS session crashed and apparently uninstalled itself, this option was a natural progression now.
  1. Create the new user and add them to the appropriate permissions (I did admin group because I need to do a bunch of admin tasks in demos)
    1. I believe you need to be an admin to install the mPOS. I haven't confirmed but I have a very strong feeling that you do.
  2. Add the user to AX (not required for mPOS but I have to demo other stuff)
  3. Setup the user in AX as a POS user that will ultimately get into the POS
    1. I won't get into the details of how to do that in this post as that would be off topic.
  4. Install the mPOS app to the user (note that the other components have already been installed on the machine
    1. Navigate out to the Retail Modern POS Tools in Windows Explorer (C:\Microsoft Dynamics AX\60\Retail Modern POS\Tools)
    2. In Windows Explorer, click File->Open Windows PowerShell->Open Windows PowerShell as administrator
    3. UPDATE 6/21/2016: change your directory in powershell to: cd "C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Modern POS\tools"
    4. Enter the following in PowerShell: .\Install-RetailModernPOS.ps1 -Path "C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail Modern POS"
      1. If you enter the location wrong, obviously you will get an error. If its correct, a bunch of stuff will occur and fly around in the PowerShell script.
      2. When successful, you'll see Figure 5 below.
    5. Create a new Device in AX
      1. You should create a new Device in AX for every new mPOS instance (Dynamics AX->Retail->Setup->Devices)
      2. If you skip this step and you activated the 'Houston-3' device like in Option 1 above, you'll get the error below in Figure 4.
      3. You can skip this step if you deactivate the other device and associate it with this instance. Up to you, but I want a new device setup.
    6. Activate the new device with the new user (Figure 6)
    7. The mPOS will open and you can log in!
    8. The device activations can be seen in Figure 7. All done!
All done! Easy enough!

Figure 4 - The error trying to activate a device that's already been activate

Figure 5 - Last part of the PowerShell script indicating everything installed correctly

Figure 6 - Activating the new device

Figure 7 - The device activations

Tuesday, January 27, 2015

Renewed as Dynamics AX MVP for 2015!

My Microsoft MVP for Dynamics AX status was renewed again for 2015! What an honor. I've enjoyed socializing with members of the AX community and fellow MVPs.

Whether it was rocking out at the 2014 MVP Summit to Beastie Boys' 'Fight For Your Right' on stage with a live band with a fellow MVP to presenting on the guest panel of the AXUG Summit to getting great momentum for the newly renewed Colorado AXUG chapter, I'm looking forward to an awesome 2015!

Tuesday, January 6, 2015

Error 'DEP6100 bootstrapping 0x80131622' from Windows Phone Emulator when attempting to build and deploy an app.

With modern businesses putting a heavier emphasis on mobile technology, there is no avoiding getting into custom apps for companies. These apps can potentially interact with Microsoft Dynamics AX via web services to accomplish things previously not able. With this in mind, its important to start getting familiar with how to develop these apps.
I was attempting to build a Windows Phone 8.1 app through Visual Studio and using the emulator to test the code out and was getting errors in the build process. 
The issue:
The app would start to build and deploy and then the emulator would pop up.
The emulator then displayed the message: 'Attempting to modify switch settings. Windows phone emulator is changing the settings of the Internal Switch so that your Emulator can function' (Figure 1). 
I'd click 'OK' and then see the error 'Windows Phone Emulator is unable to connect to the Windows Phone operating system. The emulator is unable to determine the host IP address, which is used to communicate with the guest virtual machine. Some functionality might be disabled.' (Figure 2). The emulator would open  (Figure 3) but my app wouldn't build. It was just a clean build of the Windows Phone emulator.
I'd then get a warning in Visual Studio indicating that there were errors and would I like to continue. The two Visual Studio build errors were the same: 'Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device': ObjectDisposedException - 0x80131622'  (Figure 4).
This is where things came to a screeching halt. I was not able to preview my app from this point forward.
Searching for the resolution:
This seemed like a common error online but no one seemed to have a working answer. I had to review around 10 different solutions and none of them worked for me. Maybe there is more than one thing that can cause this but no solution worked for my issue. The most drastic suggestion was uninstalling and reinstalling everything. No thanks. There has to be something else. And if I found it, I would post about it to hopefully save someone some time.
I basically just looked at the errors and poked around for a bit to find a solution. I had to keep rebuilding things after I made a single change to see if it did anything. If it didn't I'd revert the change back. I did this until I was able to come up with the solution. Kind of an educated deduction process.
The solution!!
I navigated to the network connection adapters and saw that there was one for the Windows Phone Emulator that was disabled. I didn't disabled it and something in my system (a firewall, permissions, adapter, etc) must've prevented it from automatically enabling. I manually enabled it and things started to work. This is all seen in Figure 5.
The working solution:
Once the adapter was enabled, I tried to build and redeploy the app just like before. When I did this, I saw the emulator start (Figure 6) and get to the main Windows Phone screen without any more errors or warnings. (Figure 7). There were zero popups. This may take some time for the build to get to this point so be patient.
Once the emulator was up, after about 5 seconds or so, the app I was trying to build would automatically load (Figure 8). My app didn't have a splash screen graphic so my picture below was just a black screen with a square with an X through it. After another 2-3 seconds, the app would load successfully (Figure 9) and I was able to interact with my app.
That's it! Hope this helps someone!
Figure 1 - Warning: 'Attempting to modify switch settings. Windows phone emulator is changing the settings of the Internal Switch so that your Emulator can function'

Figure 2 - Error: 'Windows Phone Emulator is unable to connect to the Windows Phone operating system. The emulator is unable to determine the host IP address, which is used to communicate with the guest virtual machine. Some functionality might be disabled.'

Figure 3 - The emulator would open and operate but the program I was trying to build wouldn't appear.

Figure 4 -  The two Visual Studio errors that would happen from the build process

Figure 5 - The solution!!! I just enabled the adapter

Figure 6 - The screen when the app is redeployed with the change in Figure 5

Figure 7 - The WP emulator comes up but just stays on the screen.

Figure 8 - The app I tried to deploy then automatically cause the emulator screen to pop this up. Because I have no splash screen image, its a square box and an 'X'.

Figure 9 - My working default app successfully working!