How to update and republish existing BCS definitions and InfoPath templates for External lists
So you have created BCS schemas, External content types, external lists, and InfoPath templates for the external lists. What if I you need to update it? Now what?
Here are the steps to follow to perform this task:
- First update the BCS schema with the new columns using SharePoint Designer.
- Refresh the data sources, update each operation to add and update the new columns
- Republish/save the new BCS schema
- From SharePoint, the external list should now have the new columns. Update the external list to show new columns in the view if desired
- With the saved copy of the old InfoPath template for the external list, right-click the file and select Design.
- This will open the Infopath template in InfoPath 2010 client. From Data tab, click Refresh fields icon in the ribbon to get the latest schema from SharePoint
- Redesign the form, republish to the external list
In the case where BCS has to be recreated and the external list has to be recreated, the steps below can be used to reuse the existing infopath template:
- With the saved copy of the old InfoPath template for the external list, right-click the file and select Design
- This will open the Infopath template in InfoPath 2010 client
- click File > Publish > Export source files to a local directory
- Open the directory containing all the artifacts of the infopath template (.xsn file). The folder should contain the manifest file as well as views xslt files.
- Right click on the manifest file, open in notepad
- Find all the references of the old url of the old external list and replace them with the new url to the new external list
- Find all the references of the old External content type (BCS names) and replace them with the new External content type
- Save the notepad manifest file
- Right-click manifest file in the folder, click Design
- Once the template opens in InfoPath client, save as a template (.xsn) file
- In the new Infopath client, from Data tab, click Refresh fields icon in the ribbon to get the latest schema from SharePoint
- Redesign the form, republish to the external list