Click here to Skip to main content
15,884,670 members
Articles / .NET
Tip/Trick

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

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
10 Jan 2013CPOL 14.5K   1  

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. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Egypt Egypt
Enthusiastic programmer/researcher, passionate to learn new technologies, interested in problem solving, data structures, algorithms, AI, machine learning and nlp.

Amateur guitarist/ keyboardist, squash player.

Comments and Discussions

 
-- There are no messages in this forum --