Forum Discussion
Ali Salih
Sep 19, 2017Iron Contributor
Is this a bug? Look up column to External List error - SP2016
Hello folks - I am trying to find out if this is a bug with the product, or an issue with my farm. So, I wanted to reach out to the community to get help on something tested. (SharePoint 2016) Pl...
Sep 21, 2017
Stack traces are usually where I start bug hunting through reflection, so they can be immensely helpful. I can certainly lab this, though. Stack trace is just a useful pointer :-)
Ali Salih
Sep 21, 2017Iron Contributor
I get it. Here we go;
Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPBusinessDataField.IsInDefaultView() at Microsoft.SharePoint.SPBusinessDataField.CreateSpFieldForBdcType(String bdcName, Boolean hidden, Boolean readOnly, Boolean idField, SPAddFieldOptions op) at Microsoft.SharePoint.SPBusinessDataField.AddNeededSecondaryFields(String wssNames, String[] oldNames, String[] newNames, SPAddFieldOptions op) at Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op) at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol) at Microsoft.SharePoint.SPFieldCollection.Add(SPField field) at Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save() at Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 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& completedSynchronously)
- Ali SalihSep 21, 2017Iron Contributor
Himm..
https://social.technet.microsoft.com/Forums/windows/en-US/6eae6ab4-cb79-418d-b831-eb23fe32c29e/create-lookup-site-column-based-on-external-list-sharepoint-2010?forum=sharepointgeneralprevious
Seems like this might be pointing to an issue of similar nature.
- Sep 21, 2017Yep, that looks like what you're hitting.
- Ali SalihSep 21, 2017Iron Contributor
Well things got even more interesting now;
- Created a default view in the EL (although the ECT read list operation related view was already marked default)
- When creating a look up, I didn't pick additional columns. And I didn't get an error..
However, it changed the Lookup type to "External Data" type column by itself..... I thought I misselected, and did it again, and it still created External Data type column... Ugh.