请问插件如何实现将下推数据包的上游单据数据展示在当前单据上,保存后能实现上下查和业务流程图查看
现在用下面代码构建了下游单据的数据包,但我不想直接保存,是在当前单据上展示,点击保存按钮才保存
ConvertOperationResult operationResult = null;
Dictionary
try
{
PushArgs pushArgs = new PushArgs(rule, selectedRows)
{
TargetBillTypeId = "", // 请设定目标单据单据类型。如无单据类型,可以空字符
TargetOrgId = 0, // 请设定目标单据主业务组织。如无主业务组织,可以为0
CustomParams = custParams, // 可以传递额外附加的参数给单据转换插件,如无此需求,可以忽略
};
//执行下推操作,并获取下推结果
operationResult = ConvertServiceHelper.Push(this.View.Context, pushArgs, OperateOption.Create());
}
catch (KDExceptionValidate ex)
{
this.View.ShowErrMessage(ex.Message, ex.ValidateString);
return;
}
DynamicObject[] objs = (from p in operationResult.TargetDataEntities
select p.DataEntity).ToArray();
// 读取目标单据元数据
var targetBillMeta = MetaDataServiceHelper.Load(this.View.Context, targetFormId) as FormMetadata;
OperateOption saveOption = OperateOption.Create();
推荐阅读