A blog on Dynamics 365 for Operations – Retail

Category: MPOS

If you are on Dynamics 365 for Operations 7.1 and planning to uptake the latest set of binary hotfixes, expect to see the above error when trying to activate MPOS.

Sergey from Microsoft has described the change that is triggered by binary hotfix KB4051347 in below link in great detail. Just one note though if you are on 7.1 you will not find the event ID 40619 in the event viewer. Its only available 7.2 onwards.

In addition you may also needed to follow these steps to make sure all MPOS packages are removed (especially when multiple user profiles are setup)

Run the following powershell script as Admin user. (Note that you can run the Powershell command by loading it the command prompt by executing powershell command as shown below)

Get-AppxPackage *pos* – allusers

2. Note the PackageUserInformation in the above results. It will list the users for which the package has been provisioned. The package can then be removed using the following script.

Get-AppxPackage *pos* | Remove-AppxPackage

Note – You will need to execute the above command for each user by logging in as that particular user in command prompt. For instance lets consider that there are two users admin and user1. You will need to execute the powershell twice, once as admin and once as user1, by using “Run as a different user” option by right clicking the command prompt icon

Events from the MPOS in AX 7 / Dynamics 365 for Operations can be found in Event Viewer here:

Event Viewer: Applications and Services Logs->Microsoft->Dynamics->Commerce-ModernPos.- Admin, Debug, Operational (where Operational would contain errors and Debug is by default disabled but can be Enabled if needed.)

Note – This article is applicable upto Dynamics 365 for Operations- 7.1 i.e. not applicable to 7.2 and above

Hi All,

I recently had to add a Blank Operation to Modern POS (MPOS) to open a url from MPOS.

Blank Operation as you may already be aware enable you to extend Microsoft Dynamics Retail for POS by adding custom logic that can be triggered from the Retail POS Register buttons. The way to implement Blank Operations in MPOS is different from Enterprise POS as MPOS is a modern app as compared to EPOS which is a windows forms based app.

So lets explore a very simple customization i.e. we want to open a URL on triggering a button from MPOS.

1. We would need to start with AX to add a button to the layout of MPOS. If you do not want to disturb the standard layouts its better to copy one of the existing layouts and then modify it using the designer. Please note the designer only opens in Internet Explorer so it will save you time by not trying to open it in other browsers e.g Chrome

2. Next we need to add this layout to the Store where we intend to use it, in my case I have choosen Houston Store

3. We need to modify the screen layout in the worker setup.

Next run jobs 1060,1070, 1090 to push the worker,store configuration and the new screen layout respectively to Channel DB.

Lets run MPOS SDK code from Visual Studio and check if the changes are reflected.

As you can see we have a new button in MPOS which can be used to invoke custom logic. Currently on triggering the button gives us a message “The blank operation identifier is invalid”

Now make the following modifications in the code.

In POS.ViewModels->OperationsMap.ts add the following line of code to register a new handler for the custom blank operation

Operations.BlankOperationHandler.registerBlankOperationHandler(“CustomOpenURL”, new Operations.OpenURLOperationHandler());

Next we need to provide the definition for the handler, to do this headover to Pos.Core->Operations->Add a new typescript file say CustomBlankOperations.ts and paste following code.

module Commerce.Operations {

“use strict”;

export class OpenURLOperationHandler extends OperationHandlerBase {

/**

* Executes the OpenURL operation.

*

* @param { IBlankOperationOptions } options The operation options.

* @return {IAsyncResultIOperationResult>} The async result containing the operation result, if any.