转换插件(基础资料、关联字段(仓位)、批号、单选辅助资料)字段赋值原创
金蝶云社区-lvys
lvys
32人赞赏了该文章 299次浏览 未经作者许可,禁止转载编辑于2023年11月27日 12:08:35


引用组件:Kingdee.K3.SCM.App.dll

命名控件:Kingdee.K3.SCM.App.Utils

转换插件示例:

 //物料                            
 var materialField = e.TargetBusinessInfo.GetField("FMaterialId") as BaseDataField;
 FieldUtils.SetBaseDataFieldValue(e.Context, materialField, newRowObj, fmaterialId);
 
 //批号
 var flotField = e.TargetBusinessInfo.GetField("FLot") as LotField;
 FieldUtils.SetLotFieldValue(e.Context, flotField, newRowObj, Convert.ToInt64(flot));

//仓位
RelatedFlexGroupField stockLocField = e.TargetBusinessInfo.GetField("FStockLocId") as RelatedFlexGroupField;
FieldUtils.SetRelatedFieldValue(e.Context, stockLocField, newRowObj, Convert.ToInt64(stockCw));

//单选辅助资料
 AssistantField assistantField = e.TargetBusinessInfo.GetField("单选辅助资料字段名") as AssistantField;
FieldUtils.SetAssistantFieldValue(e.Context,assistantField,newRowObj,"单选辅助资料主键值");


赞 32