Dynamics AX for Retail POS Development

This article is a kick start for customizing AX for Retail POS. We will see how we can modify or create new touch screen forms, operations & tables in POS system. At the end, you will also see some code samples that will also give you the feeling of how code looks in POS.

Prerequisite: You must know how to write C# assemblies, SQL Queries and X++.

Dynamics AX for Retail is a retail software that integrates point of sale (POS), retail store management, and ERP all in one solution. I am assuming you all understand how it works (atleast from functional point of view). It’s implementation includes four separate applications.

1) Dynamics AX for Retail Headquarters is managed and implemented in AX. It is designed to run at the head office. It has three modules in AX.

  • Retail Headquarters module is used to configure and manage stores, terminals, staff, retail items, promotions, gift cards, retail sales transactions and other records.
  • Retail Scheduler module is used to synchronize data between head office (AX) and stores / terminals.
  • Retail Store Inventory is used to send store inventory documents to stores to use for receiving inventory for a purchase order, picking or receiving inventory for a transfer order, or counting stock for a count order.

2) Dynamics AX for Retail POS is a .Net touch screen application having its own local database to work offline during network interruptions. This can be fully customized for any type of business and store procedures. This is what we are going to cover in this article.

3) Dynamics AX for Retail Store Connect is a windows service that sends data between the head office, stores and individual POS terminals.

4) Dynamics AX for Retail Transaction Service is again a windows service that is also a part of communication mechanism of Dynamics AX for Retail. For example; this service is used to authenticate the cashier logon credentials etc.

Customize Retail POS: After going through this article you should be able to modify or extend existing POS functionality.

In order to customize the POS, you need to download the Microsoft Dynamics AX for Retail POS Plug-ins. These plug-ins are available on Microsoft Dynamics PartnerSource or CustomerSource website.

Plug-ins folder structure.

When you download plug-ins you will get C# source code for services and triggers as well as the required documentation. Download also comes with a some .Net tutorials and a developer’s guide to customization.

Services: Services are actually .Net assemblies. POS implements many of the features as services using interfaces and can be modified using Visual Studio 2008. POS loads these services at run time by calling the interfaces. So whenever you modify or extend the standard service keep the assembly name same as original so that POS can recognize it and call it at run time.

Each service provides a specific feature in POS. There is a special service called Blank service. This service can be used to implement custom operations and can be invoked using the Blank operation.

NOTE: You can modify or develop new business logic or new touch screen forms when talking about customizing the POS. Logic is written in C# and should not be a big thing for a C# developer. In order to create touch screens Microsoft uses third party controls from DevExpress. You need buys a license of a specific version ( of DXperience WinForms for Retail April Refresh R2.

Triggers: Triggers are called before and after the operations. There are two types of triggers, Pre-triggers and Post-triggers. Pre-triggers provide a way of validation before a certain operation is executed. Post-triggers are used to respond to an operation after it has finished. You can modify the triggers same way as services.

Below are the tasks we going to perform in this session to customize POS.

  • Create a new table in POS that already exists in AX. POS database is actually a slimmed down version of AX database. All the POS tables also exists in AX as well.
    Create the required table in AX first then just open the SQL Server Management Studio and copy the Create SQL Script for this table. Now, go to your POS database (AxRetailPOS) and run this script to get the exact schema as your AX table. We need to keep table schema same at both side for data synch.
  • Write AX Retail Scheduler job to synch data between AX and POS database.
    You will use AX Retail Scheduler module to setup data synchronize jobs. AX uses these jobs to synch data between POS terminal and AX headquarters.
  • Create an operation and POS button in Button Grid (Tasks) in AX. Attach your operation with the button.
    You define your custom operation in AX which is then linked to a POS button. All custom operations are handled through the Blank operation.

    AX > Retail Headquarters > Setup
    Define a button on button grip.
    Set operation id to Blank Operation.
    Right click to set button attributes.
    Define properties you will see in BlankOperations.dll

    When you click on this blank operation bound POS button, at run time POS calls Blank operations service (BlankOperations.dll). You can modify this service and check if it’s been called with operation attributes you provided in AX.

    Blank operations service (BlankOperations.dll) can be modified from the “Retail POS Plug-insServicesBlankOperations” folder. For this, create a .Net C# Class Library project for this folder and do required modification for your custom operation. This Blank operation service only contains one class called BlankOperations. This class only has one method,

    public void BlankOperation(ref BlankOperationInfo operationInfo, ref PosTransaction posTransaction)

    operationInfo provides operation details like OperationId (Operation number), Parameter (Blank operation param) etc. posTransaction is your current retail transaction.

    After you are done compile your project and replace original BlankOperations.dll in all POS installations (Services folder) with your modified BlankOperations.dll.

  • Create a new POS plugin to show touch form to fill data. This plugin will be called from the button you added above.
    By now you know that plug-ins are .Net assemblies. You can create one for your custom functionality and put it in the Services folder. You can then call it from the BlankOperations.dll and check if this service is called by your custom button. To create touch forms you need DXperience WinForms ( license and knowledge of .Net windows form development.

That’s it for now. Do let me know if I missed something or you want me to add more things specific to POS development?

If you liked the story and want to see more of this kind of content, please follow our twitter handle @CursorRun or FB page @CursorRun
If you liked the story and want to see more of this kind of content, please follow our twitter handle @CursorRun or FB page @CursorRun
Share your love
Default image
Rahul Sharma
Rahul is a technology enthusiast, solutions architect, trainer, and blogger, working on various Microsoft and open source solutions with more than 18 years of industry experience. He specially takes interest in designing enterprise applications, cloud integrations, IoT, and other architecture rich business solutions. Rahul is a guest author with us and shares his knowledge through technology blog posts.
Articles: 59


Enter your email address below to subscribe to our website. We will never flood your inbox with unwanted emails & you can always unsubscribe anytime.


  1. Thanks for the great post. Is there a way we can modify the grid that gets displayed on the main POS form? Modify as in add new columns to the grid etc?

    Zahir Khan

  2. Hi Zahir,

    It seems this is something not possible. That particular screen uses controls defined in LSRetailPosis.POSProcesses.WinControls and that is not available for customization.


  3. Rahul,
    I have been working in LS Retail POS (NAV) for quite some time. Recently, I am also looking into AX Retail. I am just stuck in the Credit Card payment even after trying multiple option to bypass EFT validation. I need this for a demo, so only require virtual validation. Please let me know the setup to bypass the validation and carry out the Credit card pavement

  4. I actually enjoyed reading through this posting.Many thanks.

    Function Point Estimation Training

  5. Hi Rahul,

    thanks for the great post. I have been working on Retail POS from two weeks.I had created a new receipt for a gift receipt and I want to know how to call a new receipt for a new button from POS.

Leave a Reply

%d bloggers like this: