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 :
Microsoft Dynamics AX (Archived)

Calculate a table c checksum.

(0) ShareShare
ReportReport
Posted on by

Hi,

Is there any way to be calculated a table checksum or hash.

My scenario:

AX should interact with an external application. A small table data should be transferred (ID, Description) as a string list from AX to the external application through service call. The data should be transferred only if there are changes to it. For example a new record has been inserted, a record has been updated or deleted. So My idea is to calculate the checksum and transfer it to the external application along with the data. Next time the external application send to AX the last calculated checksum for the last sent data, AX calculate a new checksum for the current state of the table data and compare it with the old one. If there is a difference then AX send back to the external application a new data list along with the new checksum.

Is there a better approach this to be done or checksum calculation is the best one?

Regards,

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Calculate a table c checksum.

    I would be interested in his arguments for spending precious resources for designing, developing, testing and maintaining a less powerful and significantly slower solution that what the SQL Server team already built.

    Anyway, what's the point of using a checksum if all you want to know is if something has changed? You can simply store a time of the last modification or just use a simple flag that you always clear on successful synchronization. Calculating a checksum looks like a pointless exercise, if you don't need it for anything.

    For example, if you want to deal with it at a table-level (and always sync all records), you can have a special table holding table names and the time of the last change, which you'll update from insert(), update() and delete(). When synchronizing data, consider tables which has the last modification time higher than the last synchronization time.

  • Community Member Profile Picture
    on at
    RE: Calculate a table c checksum.
    Hi Martin,
    I told that it is not applicable because the project owner doesn't want change tracking to be enabled, so I have to find other solution. My idea was to calculate a checksum (the number of records will not be more than 20) and if the calculated checksum differs to previous calculated one this means that there is some changes, so all records are send back to the external application. In this case created, updated and deleted data will be ok.
    Regards,
  • Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Calculate a table c checksum.

    Why it's not applicable? The whole point of this standard feature is what you ask for - to identify changed records.

    If you want, you surely can collect values or all fields and calculate a checksum, but it would be quite inefficient (storing the time of the last update would be much cheaper) and it wouldn't meet your requirements, because it can't tell you that a record was deleted.

  • Community Member Profile Picture
    on at
    RE: Calculate a table c checksum.

    This is not applicable in my case.

    So the I am looking for an approach to calculate checksum or something like that in order to understand if the table state has been changed.

  • Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: Calculate a table c checksum.

    Note that the support for change tracking in AX is limited (e.g. is doesn't support deletes, if I remember it correctly), but I would rather extend then integration than building something else from scratch. That's what I did when I had the choice.

    The performance overhead of SQL Server change tracking is very low (everything handled in the application layer will be worse) and you won't have to deal with the most complicated and error-prone part.

  • Mea_ Profile Picture
    60,284 on at
    RE: Calculate a table c checksum.

    Hi Jaret,

    AX has Application Integration Framework that supports change tracking, please look at this blog post community.dynamics.com/.../change-tracking-in-ax2012-r3 maybe that's what you are  looking for.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans