誰かが助けてくれるのだろうかと思います。 Microsoft CRM 4.0で使用する多数のコールアウトを作成しましたが、これらはすべて正常に動作しています。しかし、私たちは、コールアウトの1つにエラーがあるたびに、エラーメッセージがユーザーに表示されることに気づきましたが、Windowsイベントログの[アプリケーション]タブにも表示されます。これは大きな問題ではありませんが、イベントログをいくらか補充しています!コールアウトエラーがイベントログにポストされるのを止める方法はありますか?ユーザーとイベントログに表示されるエラーメッセージと吹き出しのMicrosoft CRM 4.0アプリケーションイベントログのエラー
例、:
public override PreCalloutReturnValue PreSetState(CalloutUserContext userContext, CalloutEntityContext entityContext, ref int newStateCode, ref int newStatusCode, ref string errorMessage)
{
try
{
switch (entityContext.EntityTypeCode)
{
case Constants.TASK:
TaskCode taskCode = new TaskCode(ref _oServ, userContext.UserId);
task oTask = taskCode.GetTask(entityContext.InstanceId,
new string[]{"activityid",
"new_isdiscountauthorisation",
"new_discountstatus",
"regardingobjectid",
"isworkflowcreated"});
//*** only certain people able to update tasks (including owner) ***
if (!taskCode.PermitUpdate(userContext.UserId, entityContext.InstanceId))
{
errorMessage = "Only priveleged users and the owner of this task are permitted to update it";
return PreCalloutReturnValue.Abort;
}
break;
etc...................
etc...................
}
}
catch (Exception ex) { Utilities.LogError(ex, userContext.UserId); }
return base.PreSetState(userContext, entityContext, ref newStateCode, ref newStatusCode, ref errorMessage);
}