2011-12-05 4 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를 사용하는 플러그인을 가지고 있습니다. 플러그인에서이 단계를 비활성화하면 오류가 사라집니다! 왜이 두 레코드 중 하나가 레코드를 열어서 트리거할까요? 플러그인에서 예외가 발생 했습니까? – 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

관련 문제