背景:做PDA扫描,提交后生成单据。
调用保存方法,保存单据没问题,Cloud系统能看到保存的单据;但是,调用审核方法的时候,仅仅是提示审核失败,并无审核失败的原因,请问是怎么回事?
(我这边用的是,丁老师推荐的,纯插件创建单据的方法。)
//提交
SaveResult = BusinessDataServiceHelper.Submit(ctx, vwNewBill.BillBusinessInfo,
new object[] { vwNewBill.Model.DataObject["ID"] }, "Submit");
//审核
if (SaveResult.IsSuccess)
{
#region 审核
SaveResult = BusinessDataServiceHelper.Audit(ctx, vwNewBill.BillBusinessInfo, new object[] { vwNewBill.Model.DataObject["ID"] }, null);
if (SaveResult.IsSuccess)
{
strError = string.Empty;
}
else
{
strError = strError + "审核失败.\r\n";
foreach (OperateResult orCurrent in SaveResult.OperateResult)
{
if (!orCurrent.SuccessStatus)
{
if (!string.IsNullOrEmpty(orCurrent.Message))
{
strError = strError + orCurrent.Message + "\r\n";
}
}
}
foreach (ValidationErrorInfo veiERR in SaveResult.ValidationErrors)
{
strError = strError + veiERR.Message + "\r\n";
}
}
#endregion
}
推荐阅读