Wednesday, May 2, 2012

Testing Your InfoPath Form Before Publishing

This post applies to both InfoPath 2007, InfoPath 2010, MOSS 2007, and SharePoint 2010. Screenshots used in this post are from InfoPath 2010.

If your InfoPath form is used in a restricted domain, then you will want to know this.  In InfoPath there is a "Security and Trust" setting that specifies the security level of your form.  There are 3 levels: Restricted, Domain, and Full Trust.  It is a best practice to select the "Automatically determine security level" option.  In a restricted domain, the default security option is "Domain".



When testing your form, you will want to deselect "Automatically determine security level" and then select "Full Trust".  This lets you test out your InfoPath form before publishing.  You can test by clicking the magnifying glass or by hitting the F5 key.  You will be prompted for a username and password (of the domain your form is published to).

If you do not change the "Security and Trust" settings from Domain to Full Trust, then you will still get prompted for a username and password to preview the form, but then you will see an "InfoPath Editor Security Notice":


This will not allow you to test your data connections set up in your form, and may even prevent you from opening the form at all:


After you have tested your InfoPath form, then you need to change back the security setting to "Domain" by selecting the "Automatically determine security level".  If you publish the form with the "Full Trust" security setting, then users will not be able to access the form in SharePoint.