Wors World
All About Wor

InfoPath FormServer

If you’re using SharePoint and InfoPath forms, make sure you get the correct url to the form otherwise odd things will happen…..
 
I coded up a BDC entity page that linked to an InfoPath form, passing values from the BDC entity to the form.  I put the InfoPath form into the FormTemplates list on my SP site and coded the the url pointing directly at the .xsn (I passed the parameters to the form as name=value pairs).
 
When I clicked the link, the form was opened in a browser but the onload code was throwing exceptions when it tried to set form elements passed via the url.
 
I spent a bit of time debugging this, including adding exception handing and writing the exception details to the form.  By chance I clicked the link and happened to watch the url as it was opened, I’d been distracted to this point, and I saw that the url which I clicked was changed to call FormServer.aspx with a parameter of my form name and the parameters that I wanted to pass to the form.
 
The issue was that my parameters were having their case changed from mixed case to lower case – my code in the InfoPath form was looking for mixed case parameters.
 
Make sure you use FormServer.aspx to open your forms or you maybe bit as well.
 
 
Advertisement

No Responses to “InfoPath FormServer”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: