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.

http://mvp.microsoft.com/en-us/mvp/Justin%20Carter-5000560

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!

Sunday, December 7, 2014

Taking some time off from blogging December 2014

I am taking some time off from blogging in the month of December. I was snowboarding in Vail and I got a little extreme. Maybe I drank too much Mt Dew. I'm not sure. But I ended up judo chopping the edge of the my board with my right forearm and that was that.

So I'll restart my postings in January with the hope of doing two posts per month for the 2015 calendar year.

Happy Holidays!

Monday, November 17, 2014

10 tips for the Microsoft Dynamics AX Technical Conference 2015

Out of all of the conferences and training in a given year, the technical conference is the best one by far. This is just my opinion but I've gone to them year after year and this is by far the best conference event of the year. I'd HIGHLY recommend going.

It is February 2nd-4th, 2015 (Monday-Wednesday) in Seattle, WA. There will be post event training sessions the 5th-7th (Thursday-Saturday) but they have not been announced yet. Attendance is an extra fee for these. NOTE: This is at the Washington State Convention Center in downtown Seattle, not in Bellevue or Redmond campus like past years.

Registration is now open: http://www.microsoft.com/dynamics/AXtechconference/

You don't have to be a technical person to attend. There are functional sessions there as well. And I personally think all functional people should be familiar with the technical aspects of AX just like technical people should be familiar with functional aspects.

Its getting larger and larger every year and has switched venues over time because the sessions get so full. Not sure capacity this year but it may sell out as it gets closer to the event.

To note, that Sunday before is Super Bowl Sunday. There is an MS watch party event if you want to attend that. I was a Bronco's fan in Seahawks territory last year so I opted to not attend the party and go to a brewery instead. Denver got trounced but I got a number of free things from the bar as everyone was very friendly there and felt bad. Seattle is a great city! I'm hoping its not a Broncos/Seahawks rematch. Or do I?

10 tips for attending the MS Dynamics Tech Conference 2015
  1. Register early for the event. You can save money if you book early. Most won't dispute the value of this conference but its a factor of cost vs benefit. Booking early reduces the cost. Plus it sells out so you want to make sure you can go. I believe you can save $300 off registration if you register before December 10th, 2014.
  2. Book the hotel early. They'll fill up quickly and the rates can rise.  
  3. Try to stay in downtown Seattle or as close as you can to the Washington State Convention Center. That's where most people will go out after the events and you never know who you'll run into. The best networking happens outside of the conference and the largest concentration of AX people will be by the convention center. 
  4. Go to the post training events. Last year I went to an R3 retail hands on lab session and it was awesome. At times, you can get one on one time with the product team and you can ask why certain things were done certain ways and provide feedback. Assuming the 2015 sessions will be similar to 2014, you don't want to miss it!
  5. Take great notes during the session. You may remember things that night from the sessions you were in but after the whole week, you'll be hazy about the first day. There is just too much info. If you're in a group, try to use a shared OneNote notebook so you can see what others learned during their sessions. Divide and conquer!!
  6. Pictures are allowed during the sessions but don't post ones that they ask you not to share on social media. Keep those for your notes. The pictures will help give context to notes you may take. I tend to remember things through images so if I read written notes, I may forget details that a picture will bring back.
  7. Pick your schedule ahead of time, but don't be afraid to pull an audible. You may be in a session and they talk about something that peaks your interest you were unaware of (like SQL AlwaysOn for example). If you stay strict to your plan, you could be missing out. Follow your gut. Often the unplanned sessions end up being the most valuable ones.
  8. Bring a list of questions or topics your organization has struggled with. It's easy to lose track of your work tasks with so many shiny, new features being shown to you. The list will help you concentrate on what features and strategies you can employ now or in the future. There will be a number of experts there both presenting and in the crowd who would likely be able to help.
  9. Don't be afraid to talk to people. Networking is important in an community as 'small' as the AX group is. After the sessions, there will be a lot of opinions from technical and functional people alike in which you can learn a lot from. Additionally, be ready to share your own experiences and original opinions. Having people to bounce ideas and thoughts off of helps enhance the sessions' presented content.
  10. Don't party too hard in the evenings. It's tempting and fun I know. Especially with so many other AX enthusiasts in attendance but you'll pay for it in the AM. The sessions go fairly fast with a lot of information. If you feel like you got tackled by a sumo wrestler, the sessions might as well be in a foreign language.
Hope the above tips helps people! Looking forward to seeing everyone there!

Thursday, October 23, 2014

AX for Retail POS database size caveat

When deploying the AX for Retail POS solution, there should be a SQL DB installed at the store location. SQL Express can be installed to meet this requirement without adding to the cost of deployment for licensing (since its free!). For the most part, there won't be an issue with this. However, you need to know the issues you'll encounter in a solution so you can anticipate them.

For larger AX implementations, data growth can be an issue at the store DB as retail rollouts or data grows the size of the store side DB.  SQL Express 2012 has a DB limit of 10 GB as of 6/29/2014. 

There are a few options to address this each with their own pros and cons. One way to correct the issue is to buy a license for all SQL Server instances at all of the stores. It's a good solution if you're Scrooge McDuck or Mr Monopoly and don't care about costs. Another option is to limit what stores see what data (e.g. by region). Understand this has a con as well in that not all stores will have visibility to all of the other stores data. Yet another option is to customize the deployments to look at two different databases for the data. This is really tricky and I don't think justifies the cost compared to other alternatives. But its an option! There are other options like a central SQL box and virtualizing the stores DBs referencing that one SQL DB but then you'll still have other concerns like IO, network speeds, etc.

This blog post won't discuss a solution as there are many with each one fitting certain situations. There are even more possibilities out there I haven't even thought about. But hopefully this post will help some people start to think about the limitations proactively and start to brainstorm on their own.

-------------------------------------------------------------------------------------------
Here are some more technical details around limitations for those interested:
  1. Constrained to a single CPU (in 2012, this limitation has been changed to "The lesser of one socket or four cores", so multi-threading is possible
  2. 1 GB RAM (Same in 2008/2012)
  3. 4 GB database size (raised to 10GB in SQL 2008 R2 and SQL 2012)
The 4 GB database size limit applies only to data files and not to log files. However, there are no limits to the number of databases that can be attached to the server

However, as mentioned in the comments and above, the database size limit was raised to 10GB in 2008 R2 and 2012. Also, this 10GB limit only applies to relational data, and Filestream data does not count towards this limit (http://msdn.microsoft.com/en-us/library/bb895334.aspx).

Friday, October 17, 2014

How To: Remove Collaboration Workspaces created from AX 2012 Enterprise Portal (EP)

AX has the ability to create collaboration workspaces for various records in AX (e.g. project, opportunity) automatically from within records in AX and have them available on a SharePoint workspace site.

The workspaces will show up in the workplace home page setup location in Figure 2 below using the template also in that configuration. You can get to the settings by going to System Administration > Setup > Enterprise Portal > ‘Collaboration workspace settings’.

That’s great that they’re there and they’re very useful, but once those workspaces are no longer needed, how can we get rid of them?
 
Figure 1 – The SharePoint AX EP site with collaboration workspaces added
Figure 2 – Legal entity settings for collaboration workspace system generation
While there is no ‘correct’ way to do this, keep in mind that the idea of this is to make AX managed SharePoint subsites for collaboration. That being said, the sites used were intended to be created, linked, and deleted from within AX. It doesn’t mean that they have to be.
To SharePoint administrators, they might go into SharePoint designer, open the link where the collaboration site is (Figure 3), right click on the site, and select ‘Delete’ (Figure 4). This works but it will create an inconsistency with data between AX and what actually exists. This will yield an HTTP 404 Not Found error when users attempt to get to the specific information that doesn’t exist (Figure 5).
The above would work but you SHOULD go into and update the individual records’ information that refer to this URL. That way, it the system won’t indicate that a site doesn’t exist.
Alternately, the site can be either deleted or ‘unlinked from within AX. Unlinking is nice as it will keep the subsite available for repurposes or archival reasons. For archives though, I’d still keep it… Removing the workspaces is as easy as the below. The bullet points I made should explain how it all ties together.
Navigate to Sales and Marketing > Common > Opportunities > All Opportunities, select the opportunity with the collaboration workspace. On the ‘General’ tab in the ribbon, click the drop down for ‘Collaboration workspaces’. There are four options (Figure 6):
·         Create collaboration workspace
o   Creates a collab workspace for the record.
o   This is a ground up workspace using the template specified in the
 
·         Link collaboration workspace
o   Allows a user to link an existing collab workspace to that AX record
 
·         Delete collaboration workspace
o   Deletes the entire collaboration workspace from SharePoint
o   The site will not show up in the EP list in Figure 1
o   If another record in AX is also using that collab workspace and the user attempts to delete the workspace, AX will only unlink the collab workspace from that record, not delete it
o   The Internal/External URL fields will become blank
 
·         Unlink collaboration workspace
o   Does not delete the collab workspace from SharePoint but removes the association with that specific record
o   The site will still show up in the EP list in Figure 1
o   If the workspace is linked to other records in AX, the association will still exist for those other records
o   The Internal/External URL fields will become blank
Some extra side notes:
Each object, in this case an opportunity can only have one collaboration workspace URL associated with it: an internal and external.
As hinted above in the bullet points, multiple entities in the system can be linked to a single collaboration workspace.


Figure 3 – Opening the workspace where the collaboration workspace is located
Figure 4 – Deleting the SharePoint Collaboration Workspace subsite in SharePoint Designer
Figure 5 – The data in AX will still show the collaboration workspace but the site does not exist (HTTP 404 Not Found error)

Figure 6 – Opportunities record in AX with the options for collaboration workspaces