I am trying to pass input parameters to a published Infopath form (.xsn) from my windows application. The code I am using is this
System.Diagnostics.
Process.Start(TemplateFolderPath + "Template.xsn", "/InputParameters CRPId=1571");
The Template.xsn file is stored on a file share. The Infopath form opens up, but cannot find the parameter. When I try to retrieve it in the Form_Loading event, it throws an exception "The given key is not found in the dictionary". What am I doing wrong?