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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to sync, unsynced records from Retail Store to AX database

(0) ShareShare
ReportReport
Posted on by 560

Hi AX experts,

My customer is using AX 2012 R2 retail, while executing P-job few records are not synced from store database to AX database in RETAILTRANSACTIONSALESTRANS for unknown reason.

What is the best way to sync these unsynced RETAILTRANSACTIONSALESTRANS records from store to AX database?

Also, Synced and Unsynced records of RETAILTRANSACTIONSALESTRANS table in store database doesn’t have any difference.

Any suggestions are highly appreciated.

Regards,

Ganesh

*This post is locked for comments

I have the same question (0)
  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Ganesh,

    If you set ReplicationCounter field for RETAILTRANSACTIONSALESTRANS table to 0 in AX and re-run P-job, missing transactions should be synched, because Sync service checks replication counter for

    records that have been already inserted to AX database and copies from store database only records that have replication counter greater than the largest value found in AX. Previously downloaded data should not be updated).

    Please, test this approach in TEST system before doing the same in Production + make backups of Store + AX business databases if you decide to do this in Production.

    Regards,

    Oksana

  • sgk0803 Profile Picture
    560 on at

    Thanks Oksana for suggestion, I was setting replication counter to zero for this table(RETAILTRANSACTIONSALESTRANS ) under Retail --> Periodic --> Distribution schedule form by clicking 'Replication counters' button(in corresponding P-job).  But, even after resetting replication counter, the P-job still takes last synced replication counter value instead of zero.

    Also, replication counter form on distribution schedule showing replication counter value as temp record, modifying this will update the replication counter value for this table.

    Am I resetting the replication counter correct place? or is there any other place I have to modification for this?  

    Regards,

    Ganesh

  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Ganesh,

    You are right, Replication counter for distribution schedule is temporary, but as I know, when you update this value, real RetailTransaction* tables will be updated.

    Probably this depends on AX version....

    You can try to open any RetailTransaction* table (like RetailTransactionTable, RetailTransactionSalesTrans, etc.) and validate if ReplicationCounter field is set to 0. If it's not 0, you can write job to set this field to 0.

    Regards,

    Oksana

  • hatem.bouhdida Profile Picture
    5 on at

    Hi Oksana,

    I have the same issue and wanted to try the solution you provided but I didn't find any button in the distribution schedule to reset the counter you mentioned. you support is very appreciated if you can.

    Thanks in advance

  • hatem.bouhdida Profile Picture
    5 on at

    Ok. I see it's not available in R3.

  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Hatem,

    In R3 Async Client service uses table in store database [crt].[TABLEREPLICATIONLOG] to determine Replication counter to start from.

    You can change FilterMin, FilterMax values there to sync the transactions. As I know, existing transactions in AX should not be updated/recreated, but I would recommend to test this in Test system before doing in Production

    Regards,

    Oksana

  • Mohd saddaf khan Profile Picture
    20 on at

    Hi Oksana,

    I am also facing the same issue. Using AX 2012 R3.

    As a part of cleanup procedure, my client resets channel database every 1 year(Can't say how they do that) so replication counter again starts from 1.

    But AX database contains all previous  records. I think, because all the replication counters are already existing in AX database(previous year records), AX is not able to pull any data from store.

    I am following all the things which you mentioned in the thread,

    1. Updated replication for store as 0 in Retailtransaction* tables in AX.

    2. Updated FilterMax values as 0 in [crt].[TABLEREPLICATIONLOG] in channel database.

    Is there anything else required from AX or channel database?

    After I ran P job, FilterMax values in [crt].[TABLEREPLICATIONLOG] updated as it was before.

    I can see new RPF file is created in Upload folder but no change in AX data.

    Looking for urgent help.

  • Suggested answer
    hatem.bouhdida Profile Picture
    5 on at

    Hi,

    When clearing transactions in the Channel database (I guess RetailTransaction* tables) all transactions coming after the cleaning operation are automatically pulled to the server.

    however if this not happened try the following in the channel server :

    - Stop synch service

    - backup channel DB

    - delete * from [crt].[TABLEREPLICATIONLOG]

    - Start synch service

    - run P-0001

    Rgds,

    Hatem

  • Mohd saddaf khan Profile Picture
    20 on at

    Thanks for replying Hatem,

    I am not sure if they clear transactions from RetailTransaction* tables only.

    Also, If I am clear enough, Async client compares max replication counter in AX(for channel) and channel database, if counter in AX is lesser than what is available in Channel database, it creates file and sends transaction data to AX.

    In my case, as I said Replication counter was also reset to 1. I'll give example,

    for 2015-2016, replication counters created from 1 to 1000 and same got reflected in AX using P Job.

    Now, at start of 2016-2017, all data in channel database was cleared , so again counter started from 1 and now it is 300, but this data didn't got reflected in AX as 1-300 replicationcounter is already available in AX.

    As per your suggestion, don't I need to update replicationcounter to 0 in AX for RetailTransaction* tables??

    - Stop synch service means -Async client service stop, right?

    Also, I am not sure if that will help as file is getting created in Upload folder but no update in AX. Anyhow, I'll chk that.

    Is there anyway I can encode data in RPF file, so that I'll be sure if it contains correct data?

  • Suggested answer
    hatem.bouhdida Profile Picture
    5 on at

    As per your suggestion, don't I need to update replicationcounter to 0 in AX for RetailTransaction* tables?? NO

    Stop synch service means -Async client service stop, right? YES.

    In any case, when clearing table TABLEREPLICATIONLOG, Async service will pull all transactions and will populate TABLEREPLICATIONLOG with good counters.

    As per AX refuses duplicated transactions, so don't worry about this. AX will integrate transactions not yet pulled only.

    Try this on your test environment to be sure. good luck.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans