将A单据列表勾选的行数据 赋值到B单据的单据体中 用的是服务插件按钮
FormMetadata meta = MetaDataServiceHelper.Load(this.Context, "QX_LOADTASK") as FormMetadata;
BusinessInfo _info = meta.BusinessInfo;
DynamicObject _currentChangeObj = new DynamicObject(_info.GetDynamicObjectType());
DynamicObjectCollection entryLoadingGoods = _currentChangeObj["FLoadingGoods"] as DynamicObjectCollection;
DynamicObject entryObj = new DynamicObject(_info.GetEntryEntity("FLoadingGoods").DynamicObjectType);
entryLoadingGoods.Add(entryObj);
entryObj["FLOADINGVEHICLE_Id"] = (item["FVEHICLE"] as DynamicObject)["Id"];
entryObj["FLOADINGVHNUM"] = item["FINFOCONTAINERNUM"];
(_currentChangeObj["FLoadingGoods"] as DynamicObjectCollection).Add(entryObj);
OperateOption SaveOption = OperateOption.Create();
IOperationResult result = BusinessDataServiceHelper.Save(this.Context, _info, new DynamicObject[] { _currentChangeObj }, SaveOption, "Save");
推荐阅读