Notifications
Announcements
No record found.
Hi all,
At the time of exporting Data Entity in D365 FnO through Data Management I want to Pass range through code.
Please suggest where I write code in Data Entity.
Its a customize data entity Base Datasource is CustTable and this base Data source I nested CustTrans Table and in this CustTrans table AmountCur Field I want to pass range using x++ code AmountCur>0
I have moved this to the D365 Finance forum.
Hi Khan,
you can refer to some standard data entities on how to apply ranges, for eg. you can see in the below example, how HCMWorker table is nested with HCMEmployment table and using a range "EmploymentType" with the value as "Employee". This will result in extracting only Employees from the HCMWorker table.
about adding methods to a data entity, have a quick read on https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/design-best-practices
https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entity-computed-columns-virtual-fields
I know how to pass using Data sources range but using a code I need to do it. Because I need to write other logic also
Where / when would you want this code to run? Could you share your business requirement?
If you use the entity in x++ you can use a select statement for the data entity, and provide range there.
In OData call the range is defined by the caller. In data management project the range is defined in the data project.
And, of course all ranges defined in the entity metadata are always respected.
If you are looking list of methods then There are various methods get called while exporting data such as mapdatasourcetoentity, postload etc...Add your breakpoint in one of these methods and you can step through and see entire call stack.
In one of the earlier discussed thread below sequence is shared by Martin, take a look at that
community.dynamics.com/.../data-entity-methods-execution-sequence
You can add ranges in the data project and this ranges are stored in a container field on the data project record.
Find where this field is used and then you will find where to put your logic.
Please, check my answer on this other thread for an example on how to change data project ranges through code before executing the project.
https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/368072/data-management-framework-export-limit
Your scenario seems to be different, but I hope it helps.
Sir I want to pass range on Data Entity methods and this range should work at the time of Exporting Data using that Data Entity
For example: In CustTrans Table and AmountCur Field I want to skip all the values those are less than Zero or Zero
Please give me example
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader