zoukankan      html  css  js  c++  java
  • Dataentity call stack dynamics 365

    Th keep it here for my own reference.

      

    My notes:

    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
    5.0 postLoad


    Here are some method’s calls during Import:


    defaultCTQuery
    copyCustomStagingToTarget
    postGetStagingData
    preTargetProcessSetBased
    postTargetProcess
    1. The postLoad method is called also by import! Since postLoad is the recommended place to set values for the virtual fields, this potentially slow-down the import process unnecessarily.
    2. Be careful by using the postTargetProcess method! This method is called at the end of EACH thread/task-bundle if you are using the “Import threshold record count” option.
    3. Previously, you could add postTargetProcess only to a newly created entity, but now you can extend any entity using CoC

    Extension is simple.

    [ExtensionOf(tableStr(DataEntity))] final public class DataEntity_Extension {

        public static void postTargetProcess(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution)     {         // Do no call next         //logic here     } }

    Please note that this can be done only MDM scenarios but not via ODATA because ODATA updates, inserts records row by row and there is no post event\method to use. You might wish to use OData action to perform post actions on records.

  • 相关阅读:
    Java相关面试题总结+答案(二)
    Java相关面试题总结+答案(一)
    Java相关面试题总结
    jdk各个版本的新特性(jdk1.7,1.8,1.9)
    Java内存区域
    数据库一、二、三范式
    外部按钮控制video视频的播放暂停
    jquery获取div跟textarea标签内容
    JS获取系统时间及日期
    滚动条插件---jquery.nicescroll.js 简单使用
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/15546121.html
Copyright © 2011-2022 走看看