在移动端的移动列表上录入数据保存到自定义cloud单据的单据体上不生效,麻烦帮忙看看!IMetaDataService metaSrvice = Kingdee.BOS.Contracts.ServiceFactory.GetMetaDataService(this.Context);
FormMetadata formMetadata = MetaDataServiceHelper.Load(this.Context, "PAEZ_CK_LeadBill") as FormMetadata;
BusinessInfo info = formMetadata.BusinessInfo;
DynamicObject dynamicObject = new DynamicObject(info.GetDynamicObjectType());
DynamicObjectCollection dyEntitys = new DynamicObjectCollection(info.GetEntryEntity("FEntity").DynamicObjectType);
DynamicObjectCollection mobileEntitys = this.View.Model.DataObject["FMobileListViewEntity"] as DynamicObjectCollection;
for (int i = 0; i < mobileEntitys.Count(); i++)
{
DynamicObject dyEntity = new DynamicObject(info.GetEntryEntity("FEntity").DynamicObjectType);
dyEntity["F_PAEZ_ITEM"] = this.View.Model.GetValue("F_PAEZ_Item", i);
dyEntity["F_PAEZ_UnitID"] = this.View.Model.GetValue("F_PAEZ_UnitID", i);
dyEntity["F_PAEZ_Qty"] = this.View.Model.GetValue("F_PAEZ_Qty", i);
dyEntitys.Add(dyEntity);
}
ISaveService service = ServiceFactory.GetSaveService(this.Context);
IOperationResult result = service.Save(this.Context, info, new DynamicObject[] { dynamicObject });
推荐阅读