web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Add range in data entity
Finance forum

Add range in data entity

(0) ShareShare
ReportReport
Posted on by 2,120

Hi Techies,

We have duplicated Customer postal address entity to add range to it. We need to export only today's data using this. We tried adding 'modifiedDateTime' range in entity inside data source but it's exporting all records.

we checked all related threads but didn't get feasible solution.

Anyone has done this before? how the ranges can be added to data entity.

Any response is appreciated.

Thanks,

Sangram

  • Suggested answer
    Pedro Tornich Profile Picture
    955 on at

    Hi Sangram,

    Looking at the CustomerPostalAddressEntity I see its main DS is another entity (DirPartyLocationPostalAddressV2Entity), which in turn has a third entity as its main DS (LogisticsPostalAddressBaseEntity).

    You need to filter by the LogisticsPostalAddress modified date.

    But the problem here is that only the last entity (LogisticsPostalAddressBaseEntity) has a reference to the LogisticsPostalAddress table.

    So, to achieve what you want you will need to add the LogisticsPostalAddress modified date to the LogisticsPostalAddressBaseEntity, then to the DirPartyLocationPostalAddressV2Entity and finally to your entity (in this case you could use the out of the box entity, no need to duplicate it).

    You can add fields to existing entities through extension, the only thing is that you need to manually add the same field to the corresponding staging table through another extension.

    After adding the field to the final entity you can use it to filter the entity on the data project itself, using the SysQueryRangeUtil class.

    For example, to filter only records modified yesterday you could use the following range:

    (day(-1))

    Take a look at the following documentation for more informations on advanced filtering:

    docs.microsoft.com/.../advanced-filtering-query-options

  • Verified answer
    Sangram Shinde Profile Picture
    2,120 on at

    Hi Pedro,

    Thank you for the reply.

    We did the things you suggested already. The problem here is of 'time'. modifiedDateTime contains time as well, so while adding range of today's date it will never match to the time on which the record is modified even if the date is same.

    Here is how we achieved it - created separate log table in which we are inserting 'Location Id' whenever record is inserted or modified in address tables(LogisticsPostalAddress). Same table we joined in postal address entity based on 'LocationId'.

    So while exporting it's giving the data only that is modified.

    Now we are checking how we can clean up this log table once the export is successful, but that is the different concern.

    Thanks for your time! appreciated.

    Regards,

    Sangram

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans