Friday, January 23, 2015

"The given key was not present in the dictionary" Error while loading EP page

While loading the EP page the below error will be shown.

An unhandled error has occurred. To view details about this error, enable debugging in the web.config file or view the Windows event logs.

The given key was not present in the dictionary.

mscorlib

   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.ObjectModel.KeyedCollection`2.get_Item(TKey key)
   at Microsoft.Dynamics.Framework.Collections.NameIdReferenceCollection`1.GetByName(String name)
   at Microsoft.Dynamics.AX.Framework.Portal.Data.DataSetView.AddFieldToSelectionList(DataSourceDataFieldMetadata displayedField, String referenceFieldGroupName, Boolean skipResolvingTheField)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.ControlsCommonFunctionality.GetAndEnsureDataKeys(DataSetView dataSetView)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxForm.EnsureAllBoundFields()
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxForm.OnPagePreLoad(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreLoad(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

The root cause for this issue is missing Super() method in DataSet.init() method.