Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Refresh Entity Range

(0) ShareShare
ReportReport
Posted on by 95

Hi All,

Recently I created a entity on D365FO, in one of the datasource's table I added a range using the "CreatedDateTime" field as filter and "(DayRange(-180,0))" as value, trying to use it as dynamic date filter, it worked fine until it was deployed in prod environment, because the date range doesn't update after deployment, it's as if a daily database refresh was required for update the range from today.
Somebody knows how can I do that refresh or how can I do a dynamic date range for a entity?

Thank you so much in advance.

Regards,

Mauricio

pastedimage1681150819379v1.png

  • maober56 Profile Picture
    maober56 95 on at
    RE: Refresh Entity Range

    Hi Martin

    Thanks for your answer.

    If dayRange() doesn't work for that requirement, do you know how can I set the range to accomplish it?

    which would be the right formula?

  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    RE: Refresh Entity Range

    dayRange() is an X++ method - it's not something that can be converted to SQL and injected to the SQL view backing the entity. Therefore this design can't work. The place in data management where you can use such a method is the filter of an export project. I would expect (but I haven't tried it) that it's used for BYOD exports too.

  • maober56 Profile Picture
    maober56 95 on at
    RE: Refresh Entity Range

    Hi André

    Thanks for your answer.

    Because the data source contains many joins of tables and views, therefore, "change tracking" is not an option for us.

    We need to filter the entity with a dynamic date range. We accomplished that as I describe in the initial post, but we are running into problems with today's date update.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    RE: Refresh Entity Range

    Hi Mauricio,

    Can you tell why you always perform a full export and not take the advantage of incremental push? SQL Server change tracking can be used to know what differences to export to BYOD instead of a full push. See also the documentation on Microsoft Learn: Bring your own database (BYOD) - Finance & Operations | Dynamics 365 | Microsoft Learn

  • maober56 Profile Picture
    maober56 95 on at
    RE: Refresh Entity Range

    Hi André

    Thanks for your answer.

    I don't want to change the BYOD's behaivor, we always make a full export for that entity but it has records from the begin of our operation, I want to filter those records from the source, to reduce the amount of time and records to be exported, that's the reason to implement a range (filter) directly in the entity. We want to export only the last 6 months to date.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    RE: Refresh Entity Range

    Hi Mauricio,

    The default behavior for exporting data to BYOD, is that after an initial sync, only incremental changes will be exported. Are you able to use the standard BYOD features in Dynamics 365 or is there a reason to do this in a different way? When you use the standard, the range is not required.

  • maober56 Profile Picture
    maober56 95 on at
    RE: Refresh Entity Range

    Hi André

    Thanks for your answer.

    We will use this entity to export data through BYOD, but the source query returns a lot of records, we need to reduce them by filtering.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    RE: Refresh Entity Range

    Hi Mauricio,

    Can you explain the purpose of this entity? What is the business process about where this entity should play a role? How is this entity used in the production environment?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans