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 :
Finance | Project Operations, Human Resources, ...
Unanswered

change tracking based on field change

(1) ShareShare
ReportReport
Posted on by 252
Hi,

I have table1 inner joined with table2. And table2 inner joined with another 3 tables.

I want to enable change tracking on table1 and table2 only. And Only if a certain field is changed on table2.

so this certain field gets incremented whenever an update happens on table1 or table2. So my change tracking should only work if this certain field in table2 changed. How can i do that? is it doable via custom default query? and if yes how?
I have the same question (0)
  • Navneeth Nagrajan Profile Picture
    2,635 Super User 2026 Season 1 on at
    Hi,
     
    Change tracking modifications can be done through defaultCTQuery() method on a data entity. In this case, for change tracking to work you will need to define the change tracking on table2 and include the field based on which the query should run. Custom query should be the option to enable on the data entity at the application level and then any modifications done to the field mentioned should be picked up. Because table1 is your primary table here primary table shouldn't be the option that should be enabled, it should be custom query. 

    Also, in your data entity ensure that you add this line of code.
    <dataentityname>.addChangeTrackingDataSourcesFor<tablenameBase>(<queryobject>,fieldnum(<datasourcename>,<fieldname>);


    Sample:
    InventProductDefaultOrderSettingsEntity::defaultCTQuery()
     
     
    Hope this helps. Happy to answer questions, if any.

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 463 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 409

#3
Martin Dráb Profile Picture

Martin Dráb 280 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans