65.9K
CodeProject is changing. Read more.
Home

Solving SharePoint error 'A SharePoint list that contains data required for this form to function correctly cannot be found.'

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Jan 10, 2013

CPOL
viewsIcon

15002

Scenario 

  1. I created a solution with CutomList and ListInstance in Visual Studio
  2. Added a connection to that list in my infopath form
  3. Converted the connection to a 'Connection File' 
Now when i redeployed my solution, my info path generated this error:

A SharePoint list that contains data required for this form to function correctly cannot be found.  

Cause 

Turns out SP assigns a new GUID for the published ListInstance for each deployment, so now the GUID in the connection file points to an invalid instance.

Solution 

  1. Get the GUID of your published ListInstance
  2.  Go to the document library where you stored your connection files.
  3. Download the connection file 
  4. Edit using notepad, update the <udc:ListId> part with the GUID from step 1 
  5.  Delete the old connection file, upload the updated one.