Saturday, January 30, 2010

You have exceeded the maximum number of allowable lookup columns. (N:N Relationship)

Last week, my users report that they received an error when they click "Add Existing Contact" button in account entity. Below is the screen shot:

When I tried to trace the error, I found that it only happened on N:N Relationship entity. In Event Viewer, I found following error message:
Exception information:
    Exception type: IndexOutOfRangeException
    Exception message: You have exceeded the maximum number of allowable lookup columns.

Stack trace:    at Microsoft.Crm.Web.Controls.Lookup.Columns.Add(String displayName, String logicalName, String bindingName, String bindingAttribute, ColumnType type, String size)
   at Microsoft.Crm.Web.Controls.Lookup.LookupParser.ParseSectionColumns(XmlReader xmlReader, Object elementName)
   at Microsoft.Crm.Web.Controls.Lookup.LookupParser.Execute(String xml, Int32 objectType)
   at Microsoft.Crm.Web.Controls.Lookup.LookupDataPage.ConfigurePage()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

MS CRM has column limitation in Lookup View. You can show only up to 18 Columns. If you list more than that, IndexOutOfRangeException will occur when you add data to N:N Relationship entity. Remove columns from Lookup View will solve your problem.

Account Lookup Column limit?

No comments:

Post a Comment