Please can someone help me with the following exception. I am trying to pass parameter from one form to another using XPath.
InfoPath cannot create a new, blank form.
InfoPath cannot open the form. To fix this problem, contact your system administrator.
Form template: file:///C:\Program%20Files\bSOLVe_LS_Publish\ParametersReceived.xsn
The form is a newer version than the current form template.
Heres my code:
public void btnSubmit_Clicked(object sender, ClickedEventArgs e)
{
// XPathDocument class provides fast, read-only access to the contents of an XML document using XPath
// XmlDocument class is an editable in-memory representation of an XML document
XPathDocument document = new XPathDocument(@"C:\Program Files\bSOLVe_LS_Publish\PassingParameters\bin\template.xml");
// Creates Navigator: XPathNavigator class provides a set of methods used to insert sibling, child, and attribute nodes in an XML document
XPathNavigator navigator = document.CreateNavigator();
// Provides a typed class that represents a compiled XPath expression
XPathExpression myExp = navigator.Compile("/my:myFields/my:txtInput");
// Creates a new form using the specified form template with data specified by an XPathNavigator object.
XmlForm newDocument = this.Application.XmlForms.NewFromFormTemplate(@"C:\Program Files\bSOLVe_LS_Publish\ParametersReceived.xsn", navigator);
}