Skip to main content

SPWeb ProcessBatchData - One or more field types are not installed properly

I've created a SharePoint Timer Job that will process the contents of a tab delimetered text file, parse it through an XML field definition file, that details information on what to do with each tabbed column, and pushes it in to a nominated list in SharePoint.



To do this efficiently, I've used the ProcessBatchData method of the SPWeb object. Initially, it worked, with a sample set of about 3 columns. However, with more and more columns added, I began to receive the following error messages, as returned by the ProcessBatchData method:




<Result ID="" Code="-2130575340"><ErrorText>One or more field types are not installed properly. Go to the list settings page to delete these fields.</ErrorText></Result>



<Result ID="" Code="-2147023673"><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x800704c7)</ErrorText></Result>


I've encountered such problems in the past - particularly the error "One or more field types are not installed properly. Go to the list settings page to delete these fields." would sometimes mean the field name defined in the operation did not match the field name in the destination list.



However, after carefully looking over the field names defined in my XML field definition file, and comparing them to the field names in the detination list, they were exactly the same.



What I found instead, after a lot of trial and error removing and adding each field in the definition file, the SharePoint field names with more than 2 space characters cause these same errors.


The following field names resulted in "One or more field types are not installed" errors:



  • Contact Other Given Name

  • SON Address Line 1

  • SON Address Line 2


I changed the field names to the following, and everything started to work:



  • Contact Other Given

  • SON Address Line1

  • SON Address Line2


Also worth noting that the field names to use in your ProcessBatchData operation should refer to the Internal field name, not the Display Name. This essentially means you must refer to the field name that was originally used when creating the column in SharePoint. Any subsequent change to the column name is simply a change in the Display name, and will not work when referring to it in the ProcessBatchData operation.

Comments

Popular posts from this blog

Thoughts, shortcomings, gotchas on SPFx Dynamic Data capabilities

It's the festive break, and I thought I'd try the new Dynamic Data capabilities that recently went to General Availability in SharePoint Framework 1.7.

I've been building a lot of React components lately, and all the SPFx web parts and application customisers with visual elements we create at Engage Squared, are built on React.  Dynamic Data in SPFx introduces a whole new world of modularity that we haven't had before. We can now split up the page elements into multiple web parts that, in the past, have been combined as one web part so state can be passed between them.  Doing this gives control back to the page author, with the ability to position components how they wish.

Breaking components up in to individual web parts also changes the way the components are designed, and forces the developer to leverage the responsive capabilities of modern pages.  Modern pages are designed from the ground up to work on many different screen sizes, and as long as each individual co…

Apps for SharePoint 2013 - Client and Server-side code

It's about time I blew the dust off this blog. Tonight I did a presentation at the Melbourne SharePoint User Group entitled Apps For SharePoint (2013). It included two demos based on the App For SharePoint 2013 solution template in Visual Studio 2012.

The two demos illustrated how you can create a separate ASP.Net Web Application. Demo 1 showed how easy it is to hook in to SharePoint to obtain List properties via server-side code (populating an ASP.Net Repeater Control). Demo 2 showed what you can do with SharePoint 2013's Javascript hooks. Specifically, using SP.UI.Controls.js from the /_layouts/15/ SharePoint folder to pull chrome elements out of SharePoint, and render them in your ASP.Net web app.

No animals were harmed in the making of these demos, but a few articles kindly provided on the Microsoft MSDN site helped put it together:
How to: Set up an on-premises development environment for apps for SharePointHow to: Create high-trust apps for SharePoint 2013 using the se…

SharePoint User Profiles and Properties error

I recently encountered an issue with the Shared Services Administration page for User Profile and Properties (the page where you schedule an Active Directory profile import).

The page in question is in the Shared Services Provider site, e.g. http://server:port/ssp/admin/_layouts/ProfMain.aspx

The error that gets displayed is:
An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.

The error was odd, because I knew SharePoint Search was functioning (search crawls were running as normal, and search queries were being filled in the web front end). After a bit of investigation, I found the following table to be missing some records that were required.

So in actual fact, the error being referred to when accessing the SQL Server database was that some expected records weren't in the table being looked up, not that …