MPOS, Retail Server – JSON API Integration

Recently I had to work on developing an integration between MPOS and a CRM application via Retail Server/CRT. The REST APIs provided where JSON based and I needed C# classes to deserialize the response.

My gut feel said that there should be a tool to do this and I need not create the required classes and properties manually.

Sure enough after some web search, I found http://json2csharp.com/

This is an awesome site where you can provide a sample JSON API response and get the C# classes that can be used to deserialize the JSON.

Hope this helps  you save some time, just as it helped me.

-Hitesh Manglani

Export X++ and Binary Hotfixes description from LCS

As it stands, I have spent quite some time painfully extracting X++ and Binary hotfixes description one at a time from LCS preparing release notes for my clients. This is because there is no feature in LCS (yet) which can allow export of this information.

If you are in the same boat, and you need to prepare release notes urgently, here is a tool by Tomek Melissa that you must try. Please note that its not a Microsoft supported release so you need to try it at your own risk.

https://github.com/Microsoft/2LCS/releases

 

PS: I have tried it and it works like a charm! Its not limited to just what I mentioned in this post.

-Hitesh Manglani

 

MPOS touch screen grid freeze issue

Note – This issue occurs only on few POS models so you may or may not face this issue. I do not have a list of models that have this issue, though I have experienced this on a HP RP9 POS and on D365FO 7.1 Retail SDK

When trying to scroll through MPOS using touch gesture, in the views that have a grid (examples Tender Declaration, Show Journal, Product Search) you may experience the screen layout on the row you touch, getting out of alignment with the remaining rows and the screen freezes with no further response to touch gestures.

A workaround is to use a mouse instead of touch for scrolling but obviously this can only be a temporary arrangement.

When we contacted Microsoft support, we were given a one line code change fix  that consists in changing the WinJS script that is provided  in the Retail SDK. The script to be changed is the WinJS ui.js and update the equivalent minified file (ui.min.js). The exact change can be seen in this github link: https://github.com/winjs/winjs/commit/a48a12e33e08fccdea7879af877b2cc3a7cb8ec3

 

-Hitesh Manglani

 

A process serving application pool ‘AOSService’ suffered a fatal communication error with the Windows Process Activation Service.

When trying to host the Demo VM in the company’s data centre (host) we came across the below error-

A process serving application pool ‘AOSService’ suffered a fatal communication error with the Windows Process Activation Service. The process id was ‘3680’. The data field contains the error number.

One thing I attempted to do, based on some suggestions on the web, was to “Enable 32-Bit applications” in the app pool.

This simply changed the error message to below-

Could not load file or assembly ‘Microsoft.Dynamics.AX.Security.SidGenerator’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

I tried all the usual tools to try to troubleshoot the issue-Fiddler, Procmon, but no lead. Finally reached out to my mentor Brandon Ahmad . He was quick to point out to check the time zone on the Demo VM which may not be matching the host machine.

The demo VM was set on US Time Zone and the host was set to Singapore Time Zone, once I changed the timezone in the demo VM to match the host, that fixed the issue!

 

-Hitesh  Manglani

The significance of being in the zone, time zone that is.

This is a post with respect to how combined date/time fields is handled in AX/Dynamics 365 for Operations (Dyn365FO). For more information on the type of date and time fields in AX visit the following link from docs.microsoft.com.

Date/time data and time zones

Dyn365FO stores combined date/time fields internally in the SQL database based on UTC time zone. Whenever the date is to be displayed to the user, an offset based on the user preferred time zone is applied and then shown to the user.

This preferred time zone is set in the following section in Dyn365FO.

System Administration-> Users -> Users

User Options

Options-> Preferences

Time Zone

An excellent post that take a deeper dive on the subject along with the X++ code is found in the below link

Working with utcDateTime Functionality in Dynamics AX 2012 – StoneRidge Software

 

-Hitesh Manglani

 

MPOS Package failed to deploy – Windows cannot install package because this package depends on a framework that could not be found

So recently I successfully build my Retail SDK and uploaded the installer to one of my D365FO environment, but when trying to install the package faced the below issue.

“Windows cannot install package because this package depends on a framework that could not be found”

Here is an extract of the MPOS installation error logs.

System.IO.IOException: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.

Windows cannot install package xxx because this package depends on a framework that could not be found. Provide the framework “Microsoft.NET.CoreRuntime.1.0” published by “CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US”, with neutral or x64 processor architecture and minimum version 1.0.23819.0, along with this package to install

 

<Final Update 18 Apr 2018>

The solution is to build the package with configuration=release,

msbuild /p:Configuration=Release

thanks to MVP Kurt Hatlevik  

</Final Update>

 

-Hitesh Manglani

Update SQL Server Management Studio

If you get the following prompt while trying to Browse properties of your Database in SQL Server management studio, its time for an update.

“Cannot show requested dialog” 

“Method not found: ‘System.Collections.Specialized.StringCollection”

SQL Server Properties Error

Next step would be to  click on Tools-> check for Updates and you would most likely have an update waiting to be installed.

SSMS Update 

Click on Update in the above screen to be redirected to the link to download latest version of SQL Server Management Studio. (17.6 at the time of this writing).

Once the update is completed you would need to restart the machine.

 

-Hitesh Manglani