web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Create new table and Sync data between HQ & POS in AX 2012 R2 Retail POS

Muhammad Yasir Profile Picture Muhammad Yasir 1,023
Hi,

Today i am going to present an important scenario upon which we are heavily dependent on, while working with AX Retail POS customization.

Some times we have to save our customized data along with the retail transactions for improved reporting and management perspectives.This requires creating a new table for saving this customized data and then sync it between HQ and POS to have the data available at both HQ and Store.

We all know that P-jobs/N-jobs are used for synchronizing the data between HQ and POS. For a new table data to be synchronized,certain steps needs to be followed in a particular order to successfully transfer the data to/from HQ and POS.

Here are the steps one should follow, in order to successfully synchronize the new table data between HQ and POS store.Here i have mentioned both the scenarios, i.e pull data to HQ from POS, push data to POS from HQ.

  • Pull data to HQ from POS (Store)

For this example i am using the new table named as "MTQCardTransaction"

    • Create table in Retail HQ (Dynamics AX)
The new table consists of Primary index with fields: Store, Terminal, Channel and TransactionId. It may also contains other fields that you want to record.

Also 3 new fields needed for replication: Origin, Replicated, ReplicationCounterFromOrigin. You can copy these fields from RetailTransactionTable.



In the new table, copy 2 methods maxReplicationCounterFromOrigin, setMaxReplicationCounter from RetailTransactionTable. Change variables matching the new table. 



  • Create table in Retail POS (Store DB)
Now generate create table SQL script from AX database for the table created above.  If the table has RecId field/index, delete it.  Rename ReplicationCounterFromOrigin to ReplicationCounter with IDENTITY increment. Run the script in Store DB. This will create  new table in store DB.

This was originally posted here.

Comments

*This post is locked for comments