Microsoft dynamics 使用Conversion Studio by将Notes导入Microsoft Dynamics AX 2009

Microsoft dynamics 使用Conversion Studio by将Notes导入Microsoft Dynamics AX 2009,microsoft-dynamics,dynamics-ax-2009,axapta,Microsoft Dynamics,Dynamics Ax 2009,Axapta,目前,我正在使用Conversion Studio引入一个CSV文件,并将内容存储在AX表中。这部分工作正常。我定义了一个块,并且正确映射了字段 CSV文件包含多个注释列,如comments-1、comments-2等。这些列的数量是固定的。公共评论标记为comments-1…5,私人评论标记为private-Comment-1…5 理想的结果是将数据放入AX表中(目前正在工作),并将注释字段连接起来,或将它们作为单独的注释作为内部或外部注释存储到DocuRef表中 它不需要在我已经设置好的Co

目前,我正在使用Conversion Studio引入一个CSV文件,并将内容存储在AX表中。这部分工作正常。我定义了一个块,并且正确映射了字段

CSV文件包含多个注释列,如comments-1、comments-2等。这些列的数量是固定的。公共评论标记为comments-1…5,私人评论标记为private-Comment-1…5

理想的结果是将数据放入AX表中(目前正在工作),并将注释字段连接起来,或将它们作为单独的注释作为内部或外部注释存储到DocuRef表中

它不需要在我已经设置好的Conversion Studio项目中设置一个新块吗?你能给我指一个可能展示类似过程的资源或者如何做到这一点吗


提前谢谢

在把兔子追到兔子洞的最深处后,我发现最简单的方法是:

重写文档处理程序(扩展AppDataDocumentHandler)的onEntityCommit方法,如下所示:

AppEntityAction onEntityCommit(AppDocumentBlock documentBlock, AppBlock fromBlock, AppEntity toEntity)
{

  AppEntityAction ret;
  int64 recId; // Should point to the record currently being imported into CMCTRS
  ;
  ret = super(documentBlock, fromBlock, toEntity);
  recId = toEntity.getRecord().recId;
  // Do whatever you need to do with the recId now
  return ret;

}
以下是我插入注释的方法,以防您也需要:

private static boolean insertNote(RefTableId _tableId, int64 _docuRefId, str _note, str _name, boolean _isPublic)
{
  DocuRef docuRef;
  boolean insertResult = false;
  ;
  if (_docuRefId)
  {
    try
    {
        docuRef.clear();
        ttsbegin;
        docuRef.RefCompanyId = curext();
        docuRef.RefTableId = _tableId;
        docuRef.RefRecId = _docuRefId;
        docuRef.TypeId = 'Note';
        docuRef.Name = _name;
        docuRef.Notes = _note;
        docuRef.Restriction = (_isPublic) ? DocuRestriction::External : DocuRestriction::Internal;
        docuRef.insert();
        ttscommit;

        insertResult = true;
    }
    catch
    {
        ttsabort;
        error("Could not insert " + ((_isPublic) ? "public" : "private") + " comment:\n\n\t\"" + _note + "\"");
    }
  }
  return insertResult;
}