Tuesday, June 4, 2013

The Quasi-Definitive End to End InfoPath Deployment Guide

I really don't like using the word "quasi" but alas here I am writing a blog with the word quasi in the title. Quasi is a perfectly cromulent word, but when people use it they just sound pretentious and if there's one thing I don't like, it's pretension.

Here's what drove me to use quasi in this post's title: There's next to nothing on the internet about moving no-code solutions between environments. There's bits and pieces, but nothing comprehensive. InfoPath is a little different from other no-code solutions in that it can easily publish to different sites in different environments. However, there's a lot of subtle nuances between InfoPath Deployments and finding literature to help you from end to end can be difficult.

To bring closure to this problem, I'm writing what I call the quasi-definitive guide because this will help you with about 85% of InfoPath deployments.

This series of posts documents how to deploy site columns, site content types, SharePoint lists that are used for data connections, data connection files, InfoPath forms, and SharePoint Designer workflows that run on the InfoPath form content type. If you're using some but not all of those items, go ahead and skip to the next section. Again, this is a quasi-definitive guide and everyone's deployment is going to be different. Additionally, this post also uses PowerShell but only to get the site columns and content types. If you can't run PowerShell in your environment, it's not the end of the world. You'll just have to manually create the columns in the new environment.

To make it palatable, I've broken up the guide into a few posts. Stay tuned as they'll be posted here in the near future.

Act 1: Get your assets ready

As we proceed to give you what you need, I want to be giving you the caveat that you'll be saving several files locally. Saving them to the same folder will make your life easier. This way when we get to Act 2 and 3 you're not trying to corral files from all over your desktop.

Export Your Site Columns and Site Content Types

This assumes you're using site columns in your deployment. What? You're not using site columns? While it's not the end of the world, I can't recommend it enough. It'll make your life easier and helps create consistency across your forms' information architecture. But this post isn't supposed to be a Site Column screed, this is supposed to be about deployment so I'll end my rant.

If you are using site columns, keep reading this section. If you're not using site columns you can skip to the next section.

Follow the instructions here to export your site columns. When done, follow the instructions here to export your site content types.

Save Your Lists as Templates

If you are using lists as data sources, keep reading this section. If you're not using SharePoint lists as data sources in your InfoPath forms you can skip this section.

To save your lists as a template, go the list. In the List tab, click List Settings. In the Permissions and Management Section, click "Save list as template." Be sure to check "Include Content."

If you are using data connection files, keep reading this section. If you are not using data connection files for your data sources, you can skip to the next section.

There's two ways you can go here: You can save the entire data connection library or you can save the UCDX files onesie-twosie. If you're promoting a lot of forms and this is your initial deployment, saving the library might be the best route. If you're redeploying a form, saving the UCDX file onesie-twosie would work better.

To save the library, go the data connection library. In the Library tab, click Library Settings. In the Permissions and Management Section, click "Save library as template."

To save your files onesie-twosie, download a copy of each UCDX file from the library.

Save your Workflows

If you are using SharePoint Designer workflows, keep reading. If you're not using SharePoint Designer workflows on your form, you can stop reading and tune in to the next installment of this series.

In SharePoint Designer load your current site. Click Workflows and find the workflow(s) for your form. In the ribbon click "Save as Template." This will create WSP files in your site's Site Assets library. Save those WSPs locally on your machine.

So what did we accomplish in this post: we now have all of our assets that we'll need for deployment. By having everything prepped and ready to go this will help ensure a smooth deployment. In the next post I'll walk you through the deployment steps.

In the next act, we'll deploy and configure the assets in the new environment.