Hi,
I could find any resource which describes the call / execution sequence of data entity methods.
Can anyone provide some link or sequence?
Thanks.
Hi,
I could find any resource which describes the call / execution sequence of data entity methods.
Can anyone provide some link or sequence?
Thanks.
Do you do a cross company query from Power BI? Or how do you call the entity?
And what about sharing your code, would you mind doing that?
yes, it is only getting executed for the data of company selected as default in users option of sys admin.
basically i need to use that particular data entity for my BI dashboard so when i display that entity in BI it only shows my written code results in the fields of default company.
need help on this what can i do to solve this issue, i want to execute code for the records of all the legal entites in the system
Do you mean that postLoad gets executed only in default company of the user? Did you verify it in debugger? How did you run the entity? OData, data management project, something else?
Can you share your code?
i have written a piece of code in postload method, but it is running only on the default legal entity, else than all the entities in the system.
i mean i have am just getting the execution of my code on default entity.
is there any way i can run it for all the entities despite what so ever the default entity is ?
[quote user="AX_Dev"]Hi,
I could find any resource which describes the call / execution sequence of data entity methods.
Can anyone provide some link or sequence?
Thanks.
[/quote]here's a post with more details,
https://axatoz.wordpress.com/2019/03/10/d365-data-entity-sequence/
Eugene Tsuprenko posted this on Yammer (Dynamics 365 for Operations and AX Feedback Community) a few years ago:
Here is a sequence of method’s calls during export:
1. initValue
2. validateField
3. validateWrite
4. update
4.1. doUpdate
4.1.1. persistEntity
4.1.1.1. doPersistEntity
4.1.1.1.1. initializeDataSources
4.1.1.1.1.1. initializeEntityDataSource
Note: initializeDataSource is called once for each DataSource in Entity.
4.1.1.1.2. mapEntityToDataSources
Note: initializeDataSource is called once for each DataSource in Entity.
4.1.1.1.3. saveDataSources
4.1.1.1.3.1. updateEntityDataSource
4.1.1.1.4. mapEntityToDataSource (maybe for another record)
4.1.1.1.5. saveDataSources
4.1.1.1.5.1. updateEntityDataSource for update operation and (insertEntityDataSource for insert)
4.1.1.1.5.1.1. mapDataSourceToEntity
4.1.1.1.5.1.2. doSaveDataSource
4.1.1.1.5.1.2.1. updateDataSource
4.1.1.1.5.1.2.1.1. preupInsertDataSource
4.1.1.1.5.1.2.1.1.1. validateWrite of table
Plus:
postLoad
This method is called during the export for setting the value to unmapped fields after entity was downloaded to datasource.
Its not define anywhere . What do you want to do ? If you can provide more information on what you want we can help .
André Arnaud de Cal...
294,283
Super User 2025 Season 1
Martin Dráb
233,025
Most Valuable Professional
nmaenpaa
101,158
Moderator