Step 6 (Optional): Create Custom Outlook View Definitions (*.ovd)

SharePoint 2010

Each Microsoft Business Connectivity Services (BCS) solution folder in Microsoft Outlook explorer displays its items in a layout known as a view. Outlook views give you different ways to look at the same information in a folder by putting it in different arrangements and formats. Outlook provides standard views for each folder, such as CardView for a Business Contact item type. However, if these views do not meet your design needs, you can create custom view definitions.

Last modified: July 27, 2010

Applies to: SharePoint Server 2010

When you create a view definition in Outlook, you must first select one of five view types: table, timeline, day/week/month, card, or icon. Then you must determine how information is arranged and formatted in your new view including colors and fonts to use, and other settings. Business Connectivity Services provides a way to export custom view definitions in Outlook as *.ovd files. You can include the .ovd file in the Outlook declarative solution package and in the OIR.config file, and specify the Outlook view in which you want the external items to be displayed in your solution. Users who install the solution package will automatically see the external items in the customized view in Outlook.

To create an Outlook view definition

  1. Browse to your solution folder in Outlook. Create an Outlook view definition for the external content type and customize it the way you want. For instructions, see. Create, change, or customize a view

    Caution note Caution

    Do not customize the default Outlook view and export it. Doing this will affect all folders that use that default view to display their items. Always create a new view and customize it. In addition, make sure to use a unique name for the view so that there will be no conflicts when users install the package in Outlook.

  2. After you create the view definition, right-click the external list folder in the left navigation and click Export View Definition, as shown in Figure 1.

    Figure 1. Export view definition in Outlook

    Export view definition in Outlook
  3. Name the view definition (for example, ContosoCustomerView) and save it to the Solution Artifacts folder.

  4. Now you are ready to edit the OIR.config to tell the BCS Client Runtime about the custom view definition to use in your solution. To do this, open the OIR.config file, and in the Views section, replace the Views element with the following.

      <FolderViewDefinition Name="ContosoCustomerView" 
                            ViewFileName="ContosoCustomerView.ovd" />
  5. Save the file and then close it.

You have successfully created a custom view definition to extend your intermediate declarative Outlook solution and updated the OIR.config file with this information. You should repackage the solution, deploy it to Outlook, and test it to ensure it works as you expect.

Important note Important

If you deploy the solution on the same Outlook client in which you created the view definition, the packaged view is added with a number appended (for example, "_1"). To prevent the view name from being changed, remove the created view from Outlook before deploying, using the view manager.