Microsoft Dynamics CRM service 创建,更新等操作时,注意写抛出异常时,抛出SoapException异常
Posted on 2013-09-03 22:05 Hamilton Tan 阅读(299) 评论(0) 编辑 收藏 举报具体如下:
using System.Web.Services.Protocols;
try
{
crmService.Update(procurementPlanEntity);//更新操作
}
catch (SoapException ex)
{
var msg = "Update:" + (ex.Message + "." + ex.Detail.InnerText);
throw new Exception(msg);
}