Author: 
Data Synchronization of a Custom Table in AX and Channel Database

Data Synchronization of a Custom Table in AX and Channel Database

In some scenarios we need to create custom tables to support our business need. This means, a custom table is to be created in channel database that will synchronize data between AX HQ and Channel database, requiring some configuration and development. This blog will guide you how to extend Microsoft Dynamics AX 2012 to support synchronization between a custom table of AX database and Channel databases.

Instructions:

Step 1: Create Custom Table in AOT.

 

Step 2: Create some records in custom table.

 

Step 3: Open Retail channel schema form (Retail -> Setup - > Retail scheduler -> Retail channel schema).

 

Step 4: Select “AX 2012 R3” and click “Location tables” button.

 

Step 5: Click “New” button and enter then table name starting with “ax.” prefix.

 

Step 6: Create new fields of custom table by clicking “New” button.

 

Step 7: Click “Generate classes” button and then click “Yes” button.

 

Step 8: Open Scheduler subjobs form (Retail -> Setup - > Retail scheduler -> Scheduler subjobs).

 

Step 9: Click “New” button and enter subjob number and enter other information.

 

Step 10: Open “Transfer field list” form and then click “Functions -> Match fields” and press “Yes”.

 

Step 11: Click “OK”.

 

Step 12: Open Scheduler jobs form (Retail -> Setup - > Retail scheduler -> Scheduler jobs).

 

Step 13: Click “New” button and enter job name and enter other information.

 

Step 14: Open Scheduler jobs form (Retail -> Periodic - > Data distribution -> Distribution schedule).

 

Step 15: Click “New” button and enter job name and enter other information.

 

Step 16: Now create table in Channel DB. First Click AX DB and filtered custom table from tables node and right click on table name. Click “Script Table as” -> “CREATE To” -> “New Query Editor Window”.

 

Step 17: Now Change “MicrosoftDynamicsAX” with “channel database” and Replace all “dbo” with “ax”.

 

Step 18: Click “Execute” button to create custom table in Channel database.

 

Step 19: Now open form “Distribution Schedule” and press “Run now” button and then click on “Yes”.

 

Step 20: Check Job status from “Download sessions” form and it must be in “Applied” status.

 

Step 21: Now Check Query Channel database custom table (ax.TestTable) to see whether data synchronized or not. 

 

And as you see in above screen shot data in custom table is synchronized between AX and Channel Database Tables.

Categories: 
Ibrahim Lodhi's picture
Software Engineer at Systems Limited with 2.5 years of experience in MS Dynamics AX and .Net Development. Worked on Retail Point of Sale (POS), MS Dynamics AX and ASP.NET development. Based in LHR, Pakistan

Disclaimer: The views expressed here are solely those of the author in his private capacity and do not in any way represent the views of Systems Limited, or any other entity related to Systems Limited.

Add new comment