Customizing a SharePoint External Content List with Infopath

Anyone trying to customize the boring layout of an external list in InfoPath that you made in SharePoint, is warmly greeted with the fun loving error: “An unknown error has occurred. The form template has been published to the server but it can only be opened in InfoPath Filler.”

3

The solution is far more simple than having to hard code anything like so many different sites claim. and I won’t go into the how-to’s for creating a Business Connectivity Service connection (BCS) or an External Content Type (ECT). As there are many other tutorials out on Google that will cover it well. A great resource is Clayton Cobb. He doesn’t fancy himself a coder so he actually speaks in a language I can understand. Links to his tutorials directly are the following: BCS & ECT 1 BCS & ECT 2 BCS & ECT 3

To get right to the heart of the issue, let’s look at the error itself. “An unknown error has occurred. The form template has been published to the server but it can only be opened in InfoPath Filler.” It doesn’t tell you much at all. Except that it doesn’t like it when you try to upload the InfoPath form (template.xsn). When we push that button in SharePoint Designer to convert the External List to an InfoPath form,

1

it creates a new folder called “Item”. Then adds the following files to it: displayifs.aspx, editifs.aspx, newifs.aspx & template.xsn. IT also sets the new .aspx files as the default views for the list and the template.xsn file holds all the InfoPath form data for the list.

With that said, open SharePoint Designer in file view and navigate to the list folder containing the new files. Once there, and with the list already open in InfoPath, delete the template.xsn.

4
Now, magically, you can save your new InfoPath form without issue.
Don’t do your happy dance just yet though! If you try to add/modify/view the items in SharePoint, you’ll get an error. Two things need to happen now.
1) In InfoPath, create the corresponding views of the item views in SharePoint (New, Edit and Display). Then save the template.xsn file.

2

2) Modify the three new .aspx files in SharePoint Designer to point to the new InfoPath template.xsn file by highlighting the list web part and changing the value of FormLocation to the correct location. See the field in the top right corner of the pic below.

5



Then in the web part properties of each, set the view to match the corresponding file type.
7

Save each of the .aspx files and enjoy your new fully customized external content list form in all it’s glory. *BAM*


2 Responses to Customizing a SharePoint External Content List with Infopath

  1. Hi,
    please, could you update this post with new images? I need your help, this post is perfect and it would solve my problem with uploading InfoPath forms. Thank you so much

    • Avatar Ted Hagler
      Ted Hagler says:

      Thank you for bringing this to my attention! I guess an update to WordPress caused a break in my links. I hope it helps you out!