我正在使用Data Import Export Framework
(DIXF)解决文件交换(导出)问题,我想将生成方法添加到LineAmount
与表中的接收行关联的 Find Purchline VendPackingSlipTrans
。PurchLine
我创建了以下脚本,但我需要帮助:
[DMFTargetTransformationAttribute(true),DMFTargetTransformationDescAttribute("Function that generate LineAmount"),
DMFTargetTransformationSequenceAttribute(11),
DMFTargetTransFieldListAttribute([fieldStr(DMFVendPackingSlipTransEntity,LineAmount)])
]
public container GenerateLineAmount(boolean _stagingToTarget = true)
{
container res;
PurchLine purchLine;
VendPackingSlipTrans vendPackingSlipTrans;
if (_stagingToTarget)
{
select firstOnly purchLine
where purchLine.LineAmount == entity.LineAmount &&
vendPackingSlipTrans.OrigPurchid == purchLine.PurchId &&
vendPackingSlipTrans.PurchaseLineLineNumber == purchLine.LineNumber;
if ( ! purchLine )
{
entity.LineAmount = purchLine.LineAmount ;
entity.insert();
}
}
res = [entity.LineAmount];
return res;
}
我必须使用 DMF 将数据从 ax 导出到文件,因此我在 VendPackingSlipTrans 中存在一些字段,因此在暂存表中添加了此字段,但其他字段存在于其他表中,如 LineAmount。我不知道如何添加其他字段在暂存表中。为此,我在 myEnityclass 中创建了生成方法来关联源表中的字段。到临时表