老师,请帮忙看看。关于字段“XXX”是必填项的问题。谢谢
金蝶云社区-64116390
64116390
0人赞赏了该文章 2,915次浏览 未经作者许可,禁止转载编辑于2016年04月18日 10:46:06

JObject Json = new JObject();
JObject Model = new JObject();
Json.Add("Creator", "admin");
Json.Add("NeedUpDateFields",new JArray(""));
Json.Add("Model", Model);
Model.Add("FID", 0);
JObject jDataBase = new JObject();
jDataBase.Add("FNumber", "CN00000002");
Model.Add("FHarbour", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "7");
Model.Add("FCurrId", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "109453");
Model.Add("FDeptId", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "1");
Model.Add("FCreateOrgId", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "518151");
Model.Add("F_RJ_SALES", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "108998");
Model.Add("FCustId", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "299529");
Model.Add("FBoatName", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "512166");
Model.Add("FLinkman", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "507109");
Model.Add("FSalesCategoriesId", jDataBase);
jDataBase = new JObject();
jDataBase.Add("FNumber", "289119");
Model.Add("FBusinessGroupId", jDataBase);
Model.Add("FCLOSE", "0");

string strRet=client.Execute("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
new object[] { "RJ_QuotationTask", Json.ToString() });

报的错误信息是
{"Result":{"ResponseStatus":{"ErrorCode":500,"IsSuccess":false,"Errors":[{"FieldName":"FSalesCategoriesId","Message":"字段“销售类别”是必填项"},{"FieldName":"F_RJ_Base","Message":"字段“销售员”是必填项"},{"FieldName":"FBusinessGroupId","Message":"字段“业务组”是必填项"},{"FieldName":"FCreateOrgId","Message":"字段“创建组织”是必填项"},{"FieldName":"FCustId","Message":"字段“客户编码”是必填项"},{"FieldName":"FCurrId","Message":"字段“币别”是必填项"},{"FieldName":"FBoatName","Message":"字段“船名”是必填项"},{"FieldName":"FLinkman","Message":"字段“询价人”是必填项"},{"FieldName":"FHarbour","Message":"字段“港口”是必填项"},{"FieldName":"FDeptId","Message":"字段“销售部门”是必填项"},{"FieldName":"AbstractInteractionResult","Message":"AbstractInteractionResult.InteractionContext is null"}]},"Id":""}}

请老师帮忙看下,谢谢