locked
Bug when deleting an Entity's Attribute that is referenced in a mapping RRS feed

  • Question

  • Say I have this scenario:

    An N:1 Relationship named Relationship1

    Entity1:Attribute1 -> Entity2:Attribute2

    Within Relationship1 I have a mapping that references Entity2:Attribute2

    CRM actually allows me to delete Entity2:Attribute2, but then breaks the mapping on Relationship1 giving me an error whenever I try to view it.

    Here is the error:

    CrmException: Server was unable to process request.] at Microsoft.Crm.Application.Controls.AppGridUIProvider.Render(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.DataGrid.RenderData(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.DataGrid.RenderInnerHtml(HtmlTextWriter output) at Microsoft.Crm.Application.Components.UI.DataGrid.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at Microsoft.Crm.Application.Components.UI.CrmUIControlBase.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.] 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.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.cei_tools_systemcustomization_relationships_mappings_mappinglist_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


    Wednesday, October 22, 2008 8:04 PM

Answers

  • Here is the fix:

    Find the EntityMapId from the error message.
    Figure out the invalid SourceAttributeName(s)

    Run the following query at the database level.

    delete from AttributeMapBase where EntityMapId = ''
    and SourceAttributeName like '%%'
    Wednesday, October 22, 2008 9:30 PM