二开 生成对应的转换规则
IConvertService service = Kingdee.BOS.App.ServiceHelper.GetService<IConvertService>();
string convertRuleld = "YZGY_TO_GYLX";
var rule = ConvertServiceHelper.GetConvertRule(this.Context, convertRuleld).Rule;
List<ListSelectedRow> selectedRows = new List<ListSelectedRow>();
string sourceFormId = "xxxxx";//发起下推的单据标识
string primaryKeyValue = this.View.Model.GetValue("FId")+"";//单据头内码
string entryPrimaryKeyValue = "0";//下推的单据体内码
int rowKey = 0;//暂时没用上,给个0
ListSelectedRow sr = new ListSelectedRow(primaryKeyValue, entryPrimaryKeyValue, rowKey, sourceFormId);
selectedRows.Add(sr);
PushArgs PushArgs = new PushArgs(rule, selectedRows.ToArray());//下推入口参数
OperateOption option = OperateOption.Create();//选项参数
//option.SetVariableValue("customizeParam", "1");//注册自定义参数键值对
ConvertOperationResult result = ConvertServiceHelper.Push(this.Context, PushArgs, option);
推荐阅读