Wednesday, June 23, 2010

Resolving the “System.NullReferenceException: Object reference not set to an instance of an object” on a standard Enterprise Portal page

     
Recently we were running stress tests on various interfaces that came standard in Enterprise Portal. In particular, we were testing out the Purchase > Purchase requisitions interface. Everything worked until we clicked the New > New purchase requisition button. After that, things blew up and we got a really nasty error that began with the following:

An unexpected error has occurred.


Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.FatalSessionException: Dynamics Object Adapter Call failed. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.Framework.Data.Ax.DataSetViewRow.GetFieldValue(DataSetViewFieldMetadata field)
at System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer)
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxBoundField.OnDataBindField(Object sender, EventArgs e)
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()

Long story short, I eventually found the solution thanks to a post made by someone else who was having a similar issue, and double-thanks to the same person who took the time to come back and post the solution when he/she found it. This post can be seen here.

The problem was that I had recently added a new Dimension to the system. There was however one step that I did not know I had to do after adding the dimension and doing a synchronize. The missing final step was to re-compile the “Data Sets” node in the AOT. After doing this, and then restarting IIS on the Enterprise Portal Machine, the error went away, and problem was solved!
  

3 comments:

  1. Thanks for this Blog, But I still have the same problem with Business Portal
    Any Idea?

    ReplyDelete
  2. Link Doesn't exist now . I am facing the similar error on AX Connector.

    ReplyDelete