title: CrmException: The given key was not present in the dictionary. when opening an existing opportunity
body: <p>As the title says we're now getting a "CrmException: The given key was not present in the dictionary." error when trying to open an existing opportunity.</p>
  
  <p>This appears to only affect some records as we can still open others. My gut reaction is that one of the picklist values somehow got removed from the system but no way to tell curently.</p>
  
  <p>I guess my question is really, how do I turn this generic error message into something useful to fix the error?</p>
  
  <p>Here's the stack trace in the CRM Trace logs</p>
  
  <pre><code>[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&amp; 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&amp; 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)
  &gt;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. ---&gt; Microsoft.Crm.CrmException: The given key was not present in the dictionary.
  &gt;       at            Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
  </code></pre>
  
  <blockquote>
    <p>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&amp; completedSynchronously)</p>
  </blockquote>