Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / OData extract Entities...
Finance forum
Suggested answer

OData extract Entities modified since a date

Posted on by Microsoft Employee

Hi,

I am looking to extract entities that have been modified since a specific date.

However ( for example entity SalesOrderHeaders ) I can't see any ModifitedData when I query the odata feed. For example, i am doing a get mybaseurl/data/SalesOrderHeaders?cross-company=true the response doesn't include any Modified data so I assumed there isn't.

How could I perform this filtered extract ? I will avoid me extracting the whole dataset every time.

Regards

Vincent Diallo-Nort

Categories:
  • Blue Wang Profile Picture
    Blue Wang on at
    RE: OData extract Entities modified since a date

    HI Vincent Diallo-Nort.

    Agree to enable change tracking.

    Another way is to use a computed column (Martin mentioned). You can use the SysComputedColumn::returnField () method to get the modified field .

    However, there is a problem to note that some data source tables do not have ModifiedDateTime enabled.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,914 Super User on at
    RE: OData extract Entities modified since a date

    Hi Vincent,

    I have used BYOD as a step in between. When you enable change tracking and schedule at least once a day, you would have your information. In BYOD, the entity automatically gets an additional column for the sync date/time. This can be your workaround to use it as modification date.

  • Martin Dráb Profile Picture
    Martin Dráb 225,549 Super User on at
    RE: OData extract Entities modified since a date

    Note that entities typically consists of multiple tables, therefore it's not as simple as exposing a single field.

    BYOD synchronization utilizes change tracking; maybe you could consider something like that.

    I've also seen people building a computed column returning the highest ModifiedDateTime value from all tables used in the entity.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans