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)

Latest Modified Date from a View

(0) ShareShare
ReportReport
Posted on by

Hi,

I am just a rookie in the field of AX, so this question might be just plain stupid or wrong in terms of "technical word usage".

Problem Statement: How I can get the Latest Modified Date, if there are any updates on a View. I suppose there are multiple tables in back end which have modified date but which one to pick for a particular record?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Latest Modified Date from a View

    you need to track the records by tables only. As André Arnaud de Calavon  explained it earlier View is just a  SQL statement on one or more tables.

  • Community Member Profile Picture
    on at
    RE: Latest Modified Date from a View
    Situation is represented in below snippet.

    SELECT A.Columns, B.Columns, C.Columns, D.Columns, FROM TableA A JOIN TableB B ON A.ID=B.ID JOIN TableC C ON B.ID2=C.ID2 JOIN TableD D ON C.ID3=D.ID3

    So as you see a record is coming after joining 4 tables (Based on business requirement or needs). This code act as a view. 

    Underlying tables are AX Base tables or AX views. When any user update anything on AX Front End; modified date is captured in respective table. 

    So, now in this case I need the Latest Modified Date for each record retrieved by above joins.

    PS: Currently I have used "CASE Statement" to tackle this issue. 

  • Martin Dráb Profile Picture
    235,928 Most Valuable Professional on at
    RE: Latest Modified Date from a View

    The fact that you're doing a migration doesn't explain why you want ModifiedDateTime on views.

    What's the purpose of ModifiedDateTime in your views? Maybe you should use change tracking or something... And why do you have 1500 custom views in the first place? Explaining the business scenario would allow us to suggest your some options.

  • Community Member Profile Picture
    on at
    RE: Latest Modified Date from a View

    Business requirement is to migrate from legacy to AX. I am in middle of this process right now. The views which were used by legacy system are now to be used for AX(after correct metadata mapping). Problem was when I use say ModifiedDateTime from one table (say multiple tables joined in the view) I am not sure whether chosen ModifiedDateTime is latest or not.

    Currently I have used a Case statement to handle this situation but to do that in all the views is cumbersome and not intelligent.

    I was hoping if I could find another way to deal with it and thus it leads me to this forum.

  • André Arnaud de Calavon Profile Picture
    297,389 Super User 2025 Season 2 on at
    RE: Latest Modified Date from a View

    You had asked a question from which I can imagine, sometimes you want to have a latest modified date, but are you now telling you want to change all views? What is the business requirement here to change 1500 views?

  • Community Member Profile Picture
    on at
    RE: Latest Modified Date from a View

    Exactly, So now which Modified Date Time column should I choose in view definition when there are, say 5 tables used in Join, each having its own Modified Date Time column. I want the latest. Currently I am using a CASE statement but I can't do this for all the views as there are more than 1500 Views in question.

  • André Arnaud de Calavon Profile Picture
    297,389 Super User 2025 Season 2 on at
    RE: Latest Modified Date from a View

    A view is nothing else than a SQL statement on one or more tables. So there is no tracking for updates on this. Only tracking on real tables are possible.

  • Community Member Profile Picture
    on at
    RE: Latest Modified Date from a View

    I understand your reply. But how actually AX keeps track of updates on a view. There must be at least one table object in the back end which is keeping track of it. Am I right?

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    297,389 Super User 2025 Season 2 on at
    RE: Latest Modified Date from a View

    Hi Himanshu,

    It would be possible to create a computed column on a view which would find the maximum date out of multiple data sources.

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
Mea_ Profile Picture

Mea_ 4

#3
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans