Step 3: Create the Solution Manifest

Applies to: SharePoint Server 2010

The solution manifest file (OIR.config) is the main file that the Business Connectivity Services Client Runtime uses to configure your advanced code-based Microsoft Outlook solution. In this file, you describe the user interface (UI), behavior, and business logic that is associated with the external items in an Outlook advanced code-based solution. For example, in the solution manifest file, you can specify that for an Outlook item type of Contact, a certain UI should be used (for example, an external data part) and a specific method in the external system (for example, UpdateCustomerInstance(ID, NewInstanceValues)) should be called to update an item if it is changed in Outlook.

The solution manifest file begins by specifying the specific Outlook data type that the primary external content type maps to, such as Contact or Task.

We recommend that you create a basic solution manifest file. In the solution manifest file, you can do the following:

  • Specify general solution settings, such as the unique identifier (ID) and a display name for the solution.

  • For each external content type that will be displayed in an Outlook folder:

    • Define each field of the external content type that should be surfaced in Outlook and how they should be mapped to the fields that are specific to Outlook. Fields that are not exact matches can also be specified, although they must be defined by a specific Outlook data type that Outlook recognizes (for example, Text, YesNo, or DateTime). These custom fields are created and surfaced in the form region in Outlook.

    • Specify the name and other details of the Outlook folder that will contain the external items.

Prerequisites

  1. Step 1: Create the BDC Model

  2. Step 2: Create a Cache Subscription

Creating a Solution Manifest

Use one of the following two approaches to create the solution manifest.

Tooling Approach

Use the BCS Artifact Generator Tool to create the solution manifest based on the BDC model.

Manual Approach

  1. Locate the Template: Solution Manifest (Oir.config) that is provided in the SharePoint 2010 SDK, copy it, and then save it to the Solution Artifacts folder as OIR.config.

  2. Open the OIR.config file for editing in an XML editor. If you are opening the XML file in Microsoft Visual Studio, attach the OIR.config Declarative schema (SolutionManifestDefinitions.xsd) and SolutionManifestDeclarativeExtensions.xsd. This will give you IntelliSense functionality and help you to create valid entries. See the SolutionManifestDefinitions Schema and SolutionManifestDeclarativeExtensions Schema documentation for more information.

  3. Replace the values marked with EnterX in the XML with valid values. The following XML example shows how it might look after editing.

    <?xml version="1.0" encoding="utf-8"?>
    <SolutionDefinition xmlns:Declarative="https://schemas.microsoft.com/office/2009/05/BusinessApplications/Manifest/DeclarativeExtensions" 
    xmlns="https://schemas.microsoft.com/office/2009/05/BusinessApplications/Manifest" xmlns:xsl="http://www.w3.org/2001/XMLSchema-instance">
      <SolutionSettings SolutionId="ContosoSalesManager" SolutionDisplayName="Contoso Sales Manager" SolutionVersion="1.0.0.0"/>
      <ContextDefinitionGroups>
        <ContextDefinitionGroup xsl:type="Declarative:DeclarativeContextDefinitionGroup" ItemType="OutlookContact" >
          <ContextDefinition xsl:type="Declarative:DeclarativeContextDefinition" ContentType="OutlookContactCustomer">
            <Entities>
              <Entity Name="Customer" EntityTypeName="Customer" EntityTypeNamespace="AdventureWorksContoso" Description="Customer">
                <View Name="PrimaryEntityNameInContext" ViewName="GetCustomerById" Description="GetCustomerById" IsPrimary="true">
                  <PromotedProperty Name="CustomerId" ViewInstancePath="CustomerId" OfficeItemPropertyName="CustomerId" ReadOnly="true" />
                  <PromotedProperty Name="Title" ViewInstancePath="Title" OfficeItemPropertyName="Title" ReadOnly="false" />
                  <PromotedProperty Name="FirstName" ViewInstancePath="FirstName" OfficeItemPropertyName="FirstName" ReadOnly="false" />
                  <PromotedProperty Name="MiddleName" ViewInstancePath="MiddleName" OfficeItemPropertyName="MiddleName" ReadOnly="false" />
                  <PromotedProperty Name="LastName" ViewInstancePath="LastName" OfficeItemPropertyName="LastName" ReadOnly="false" />
                  <PromotedProperty Name="Email1Address" ViewInstancePath="EmailAddress" OfficeItemPropertyName="Email1Address" ReadOnly="false" />
                  <PromotedProperty Name="BusinessTelephoneNumber" ViewInstancePath="Phone" OfficeItemPropertyName="BusinessTelephoneNumber" ReadOnly="false" />
                  <PromotedProperty Name="ModifiedDate" ViewInstancePath="ModifiedDate" OfficeItemPropertyName="ModifiedDate" ReadOnly="false" />
                </View>
              </Entity>
            </Entities>
            <OfficeItemCustomizations xsl:type="OutlookItemCustomizations" ItemTypeDisplayName="Contoso Customer" MessageClass="IPM.Contact.AWWSCustomer">
              <OfficeItemProperties>
                <OfficeItemProperty Name="CustomerId" PropertyName="CustomerId" PropertyType="OutlookInteger" />
                <OfficeItemProperty Name="Title" PropertyName="Title" PropertyType="OutlookText" />
                <OfficeItemProperty Name="FirstName" PropertyName="FirstName" PropertyType="OutlookText" />
                <OfficeItemProperty Name="MiddleName" PropertyName="MiddleName" PropertyType="OutlookText" />
                <OfficeItemProperty Name="LastName" PropertyName="LastName" PropertyType="OutlookText" />
                <OfficeItemProperty Name="Email1Address" PropertyName="Email1Address" PropertyType="OutlookText" />
                <OfficeItemProperty Name="BusinessTelephoneNumber" PropertyName="BusinessTelephoneNumber" PropertyType="OutlookText" />
                <OfficeItemProperty Name="ModifiedDate" PropertyName="ModifiedDate" PropertyType="OutlookDateTime" />
              </OfficeItemProperties>
              <OutlookFolder Name="ContosoCustomers" FolderDisplayName="Contoso Customers" NativeType="FolderContacts" SubscriptionName="AdventureWorksContosoCustomerSubscription" FolderName="ContosoCustomerFolderID" CanCreate="true" CanUpdate="true" CanDelete="false">
              </OutlookFolder>
            </OfficeItemCustomizations>
          </ContextDefinition>
        </ContextDefinitionGroup>
      </ContextDefinitionGroups>
    </SolutionDefinition>
    
  4. Save and close the file.

You have successfully created the basic OIR.config file that is needed for the advanced code-based Outlook solution.

Next Steps

Step 4: Implement the Advanced Code-Based Outlook Solution