DATA ENTITY METHODS CALLING SEQUENCE IN D365
Data entites method calling sequence in D365FO
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 is downloaded to datasource.
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 is downloaded to datasource.
EXPORT:
Entity- postLoad()
staging - insert()
Entity- postLoad() - depends on records
IMPORT:
staging - postLoad()
Entity - postLoad()
Entity - initValue()
Entity - validateField() - depends on no of fields
Entity - validateWrite()
Entity - insert() / update()
Entity - persistEntity()
Entity - initializeEntityDataSource()
Entity - mapEntityToDataSource()
Entity - insertEntityDataSource() / updateEntityDataSource()
Entity - mapDataSourceToEntity()
staging - postLoad()
Entity- postLoad()
staging - insert()
Entity- postLoad() - depends on records
IMPORT:
staging - postLoad()
Entity - postLoad()
Entity - initValue()
Entity - validateField() - depends on no of fields
Entity - validateWrite()
Entity - insert() / update()
Entity - persistEntity()
Entity - initializeEntityDataSource()
Entity - mapEntityToDataSource()
Entity - insertEntityDataSource() / updateEntityDataSource()
Entity - mapDataSourceToEntity()
staging - postLoad()
Well,this is a very good and useful post about some operations and commands that sometimes frequently get noticed or applied while solving some complex operations.
ReplyDeletePowerbi Read Soap
Thanks
ReplyDelete