A developer has created an InfoPath form (Designer 2013), the form has some custom code behind the scenes, it also has 2 drop down option boxes that connect to a list on a SharePoint 2013 site. When the form is deployed via visual studio it is deployed to a form library on the same team site where the list resides. There are other drop down option boxes linking to another list on another team site via a UDCX data string connection.

When deployed and the form loaded up via a browser the 2 drop down boxes error out, the error message being...

The following query failed:

Activity (User: USERNAME, Form Name: SCA FORM NAME, IP: , Connection Target: , Request:DataAdapterException, Exception Message: The form cannot run the specified query. The list could not be found.)

The drop down boxes using UDCX work fine, if I create a new InfoPath form with only the same 2 drop down boxes and publish directly without going via visual studio, the form loads up fine with no error messages, so I'm not thinking it's permissions being the culprit and the list is definitely there.

It appears that deploying the form via Visual studio causes the issues. But it needs to be deployed this way due to custom code on the form.

Has any one got any ideas please?


1 Answer 1


I am a newb to InfoPath development. As I come across your question, I can only say that I have an InfoPath form that I've started to edit in InfoPath Designer, and then I put some code-behind logic using the Visual Studio Tools for Applications (VSTA) ...

But, after I've put in my custom logic, I can still go back to InfoPath designer and use it's 'publish' button and I understand (from other reading) that InfoPath Designer always calls out to VSTA (whether open or not) to compile/package any would-be codebehind code before sending the template.xsn back up to our SharePoint server.

Did you figure out a solution? Are you certain it can't be deployed via Designer?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.