Chances are you’ve already read Brad Stevenson’s post Types of Solutions and you’re interested in building a BCS solution.
If you’ve read my post on the BCS Solution Packaging Tool, perhaps you’ve already tried to build and package a solution yourself.
To help out developers and power users we’ve created another new tool called the BCS Artifact Generator which will greatly help you get started building working solutions, which you can then customize however you’d like.
To use the tool simply select your BDC Model (see Lionel Robinson’s post Creating an External Content Type in SharePoint Designer 2010 for help creating a BDC Model), give your solution a name, then follow the wizard which guides you through picking and choosing how your solution will look in Outlook. When you click “Generate” the tool will produce a folder containing all of the files necessary to run a BCS solution.
You can then point the Solution Packaging Tool at this folder to package and deploy your solution to Outlook, all in a matter of minutes.
You can download the free Artifact Generator tool from MSDN Code Gallery.
Also, be sure to download the free Solution Packaging Tool, also from MSDN Code Gallery.
To create a declarative BCS solution in Outlook, you’ll do the following:
Creating a BCS Package is done using the Solution Packaging Tool, which we’ve seen already. This post will examine the first step – creating the solution artifacts. We’ll show you how quickly and easily you can do this using the Artifact Generator tool.
To have a solution you’ll need the following three files at the very least:
Having these three artifacts will allow you to create and deploy a solution in Outlook. In addition, your solution can contain the following three customizations:
A) A custom item Taskpane (item C in the screenshot below)
B) A custom item Form Region (item D in the screenshot below)
C) A custom ribbon containing item action buttons (item B in the screenshot below)
The following screenshot shows a declarative solution and each of the three aforementioned customizations:
To add a custom Taskpane to your solution you’ll need each of the following:
a) InfoPath Form [.xsn]
b) Layout file [.xml]
c) A few lines of XML added to the Solution Manifest
To add a custom Form Region to your solution you’ll need each of the following:
a) Office Form Storage File [.ofs]
b) Form Region Manifest [.xml]
To add a custom ribbon tab with action buttons to your solution you’ll need each of the following:
a) Ribbon definition file [.xml]
b) A few lines of XML added to the Solution Manifest
You can now use the Artifact Generator to create most of these files automatically:
Before using the tool, be sure to create the following files if you’d like to include them for use:
Then, use the BCS Solution Packaging Tool to select this folder and create a new solution package to be used for installation and deployment of the solution. Be sure to select “Outlook Intermediate Declarative Solution” as the solution type.
You should now have created an Intermediate Declarative Solution in Outlook!
If you’ve read my post Overview of BCS Advanced Code-Based Solutions or the MSDN article Creating Advanced Code-Based Solutions Using Business Connectivity Services you’re aware that you can create Office Add-Ins using Visual Studio which can integrate with BCS and external data.
These solutions need metadata and subscriptions on the machine running the solution, which dictate synchronization of the external data between the client and the external system. This metadata can be set up on that machine by having a user deploy a Simple Solution to Outlook or SharePoint Workspace, but this requires additional steps that each user of your solution would have to perform initially.
The ideal and recommended approach is to use a complementary Data Solution to go with your Office Add-In, which will set up the metadata and subscriptions on the user’s machine automatically.
A Data Solution requires the following files:
Again, you can either create the subscriptions by hand or use the Artifact Generator to create them for you. Simply import your BDC Model to the Artifact Generator and click “Generate artifacts”. Then, use the Solution Packaging Tool to point to that folder and create a BCS Package of type “Data Solution for Office Add-In”.
If the user deploys this solution and then deploys your Office Add-In, your add-in will be able to display and manipulate external BCS data.
To try this out for yourself, check out the following: Business Connectivity Services Excel 2010 Add-In.
Thanks for reading, and enjoy the tool!
Russell Palmer
Program Manager