Saturday, October 26, 2013

Steps to Deploy InfoPath form into SharePoint



Design An InfoPath form using InfoPath designer tool. Deploy InfoPath form templates using publish option in InfoPath Designer. You cannot create a form based screens as an out-of-box feature in SharePoint. The simple and easy way to create a form based screens by using InfoPath Form designer. 

For example, you can create Leave Application form using InfoPath tool and deploy it in SharePoint environment. 

Just drag and drop the controls into the InfoPath Form and write a code behind using VSTA and save the form.

There are 3 ways to deploy InfoPath form to SharePoint environment.

1. To a SharePoint Form Library - This option will deploy an InfoPath form template to a SharePoint form library. You can just deploy InfoPath form template directly to a SharePoint form library when you don’t need to use any other location.

2. As a SharePoint content type - If you want to reuse across several sites and document libraries, deploy it as Content Type

3. As an administrator-approved form template

If you write  .NET managed code in InfoPath form, use Administrator-approved deployment step

When you deploy the InfoPath  form in this way, you have to first download template file to some location.Go to central administration, Click on Manage Form Templates library section, Upload the template which was saved earlier and Activate the form template to site collection

If you want to associate this form template to any form library, Create form library in any site. Go to Advanced settings page, select your form template from Site Content type gallery. Now you can create forms and save the forms.

Another way to deploy the InfoPath form as a feature.

Create Project using Visual Studio, Add module item and attach xsn file to the Module

Create a feature to the project. define all the XML nodes in the feature.xml file.

Save and Deploy the Project.

Go to Central Admin-> Application Management -> Manage Form Templates -> Locate the template file

No comments:

Post a Comment