调用接口生成收款单报错
金蝶云社区-俊衡
俊衡
0人赞赏了该文章 897次浏览 未经作者许可,禁止转载编辑于2015年11月06日 10:16:17

我在调用接口,生成收款单时一直报错:
代码如下:
///


/// 保存收款单
///

public string Save_SKD()
{
string ret = string.Empty;
ApiClient client = new ApiClient(ApiClientUrl);
bool bLogin = client.Login(DataCenter, Administrator, AdminPWD, 2052);

// 登陆成功
if (bLogin)
{
//业务对象Id 用户
string sFormId = "4100df9e-c4a8-4fc9-9495-9b0ce5928558";
//Json字串
string sJson = "{\"Creator\": \"Kingdee268\",\"NeedUpDateFields\": [ \"\"]," +
" \"Model\": {\"FID\": 0,\"FBillTypeID\": {\"FNumber\": \"SKDLX02_SYS\"}," +
" \"FBillNo\": \"\"," +
" \"FDATE\": \"2015-11-5\"," +
" \"FCONTACTUNITTYPE\": \"ORG_Organizations\"," +
" \"FCONTACTUNIT\": {" +
" \"FNumber\": \"1002\"" +
" }," +
" \"FPAYUNITTYPE\": \"Organizations\", " +
" \"FPAYUNIT\": { " +
" \"FNumber\": \"1002\" " +
" }, " +
" \"FCURRENCYID\": { " +
" \"FNUMBER\": \"PRE001\" " +
" }, " +
" \"FRECEIVEAMOUNTFOR_H\": 100, " +
" \"FREALRECAMOUNTFOR\": 100, " +
" \"FPAYORGID\": { " +
" \"FNUMBER\": \"1002\" " +
" }, " +
" \"FSETTLEORGID\": { " +
" \"FNUMBER\": \"1002\" " +
" }, " +
" \"4100df9e-c4a8-4fc9-9495-9b0ce5928558__FRECEIVEBILLENTRY\": [ " +
" { " +
" \"FSETTLETYPEID\": { " +
" \"FNumber\": \"JSFS01_SYS\" " +
" }, " +
" \"FPURPOSEID\": { " +
" \"FNumber\": \"S2209.01\" " +
" }, " +
" \"F_ljy_Base1\": { " +
" \"FNumber\": \"1002\" " +
" }, " +
" \"F_ljy_Assistant3\": { " +
" \"FNumber\": \"2002\" " +
" }, " +
" \"FRECTOTALAMOUNTFOR\": \"100\", " +
" \"FREALRECAMOUNTFOR_D\": \"100\", " +
" \"FCOMMENT\": \"备注\" " +
" } " +
" ] " +
" } " +
" } ";

object[] saveInfo = new object[] { sFormId, sJson };
//调用保存接口
ret = client.Execute("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", saveInfo);

bool bRet = JObject.Parse(ret)["Result"]["ResponseStatus"]["IsSuccess"].Value();
if (!bRet)
{
ret = JObject.Parse(ret)["errorMessage"].Value();
}
}
return ret;
}

报错信息如下:

请高手指点。