2011-12-05 17 views
0

タイトルに「CrmException:取得されたキーが辞書に存在しません」というメッセージが表示されます。既存の案件を開こうとしたときにエラーが発生しました。CrmException:指定されたキーがディクショナリに存在しませんでした。既存の機会を開くとき

これはまだ他のレコードを開くことができるため、一部のレコードにのみ影響するようです。私の嫌な反応は、ピックリストの値のどれかがシステムから何らかの形で取り除かれましたが、現実には分かりません。

私の質問は本当に、この一般的なエラーメッセージをエラーを修正するのに役立つものにするにはどうすればいいですか?ここで

は、プラグインがあなたのプラグインが例外をスローして、その後無効になっている時にプラグインが有効になっていないときに、あなたがこの例外を取得している場合はCRMトレースのスタックトレースは、はい

[2011-12-05 17:00:33.848] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 26 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ExceptionConverter.ConvertMessageAndErrorCode 
at ExceptionConverter.ConvertMessageAndErrorCode(Exception exception, Int32& errorCode) 
at ExceptionConverter.ToSingleFaultOther(Exception exception) 
at ExceptionConverter.ToSingleFaultUntyped(Exception exception) 
at ExceptionConverter.ConvertToFault(Exception exception) 
at ExceptionConverter.TryConvertToFaultExceptionInternal(Exception exception, Boolean createNewFaultException, FaultException`1& faultException) 
at FaultHelper.ConvertToFault(Exception exception) 
at ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError) 
at MainApplication.Application_Error(Object sender, EventArgs eventArguments) 
at EventHandler.Invoke(Object sender, EventArgs e) 
at HttpApplication.RaiseOnError() 
at ApplicationStepManager.ResumeSteps(Exception error) 
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) 
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) 
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) 
>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #B89073F3: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: The given key was not present in the dictionary. 
>  at   Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal() 

at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveCommand.Execute() at Microsoft.Crm.Application.Platform.EntityProxy.Retrieve(String[] columns, Guid auditingTransactionId) at Microsoft.Crm.Application.Platform.EntityProxy.Retrieve(String columnSet, Guid auditingTransactionId) at Microsoft.Crm.Application.Platform.EntityProxy.Retrieve(String columnSet) at Microsoft.Crm.Application.Forms.AppForm.FormLoadEvent() at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) at Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, FormDescriptor fd) at Microsoft.Crm.Application.Components.PageHandlers.OpportunityRecordPageHandler.ConfigureFormHandler() at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName) at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

+1

フォームのオープンイベントで実行するコードはありますか? –

+1

またはそのエンティティに登録されているプラ​​グインはありますか? –

+0

私たちは、機会のためにCREATEとUPDATEを使用するプラグインを持っていますが、プラグインでこれらの手順を無効にすると、エラーはなくなりました!なぜこれらの2つのうちの1つがレコードを開くだけでトリガーになるのですか?これはプラグインからこれを引き起こす例外ですか? – user1231231412

答えて

2

をログに記録しますこれはあなたが見ているエラーメッセージに伝えられています。

これは、実際にプラグインを実行しているレコード(この場合は案件)にないプロパティを動的エンティティで使用していることが原因と考えられます。スペルミスや未公開のカスタマイズなどがないか確認してください。

、このようなエラーを回避する方法の詳細については、このリンクを参照してください:http://splatto.net/portfolio/blog/post/2010/07/30/0x80040265-The-given-key-was-not-present-in-the-dictionary.aspx

この例外を発生させているかをテストするもう一つの素晴らしい方法は、例外をスローかを確認するために、プラグインでリモートデバッグを実行することです:http://msdn.microsoft.com/en-us/library/cc151088.aspx

関連する問題