物料分配接口问题
金蝶云社区-云社区用户7e748509
云社区用户7e748509
0人赞赏了该文章 1,371次浏览 未经作者许可,禁止转载编辑于2016年01月08日 10:55:20

在动态表单中生成物料时,进行物料分配
代码如下:
FormMetadata metadata = Kingdee.BOS.App.ServiceHelper.GetService().Load(this.Context, this.View.Model.BusinessInfo.GetForm().Id) as FormMetadata;
var allocateParameter = new AllocateParameter(this.View.BusinessInfo, metadata.InheritPath, int.Parse(billView.Model.DataObject["CreateOrgId_id"].ToString()),
BOSEnums.Enu_AllocateType.Allocate, OperationNumberConst.OperationNumber_Allocate);
allocateParameter.PkId = new List { billView.Model.DataObject["id"].ToString() };
allocateParameter.DestOrgId = id;
allocateParameter.DestOrgName = name;
ServiceHelper.GetService().Allocate(this.Context, allocateParameter);


在执行ServiceHelper.GetService().Allocate(this.Context, allocateParameter)后报
"表单未定义操作中未指定操作代码,不能进行分配。"的错误.
有什么方法解决