Step 3: Create the Solution Manifest File (OIR.config)

The solution manifest file (OIR.config) is the main file that the BCS Client Runtime uses to configure your intermediate declarative Outlook solution.

Applies to: SharePoint Server 2010

In the OIR.config file, you describe the user interface (UI), behavior, and business logic associated with the external items in an Outlook declarative 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 Outlook specific data type that the primary external content type maps to, such as Contact or Task. But as the central control file, it has to do much more than define the entity mapping to Outlook. It also links to other XML files such as the layout file, which is used to define the task pane and the ribbon file, and so declaratively defines any custom ribbon controls that the solution requires. It also specifies any actions that will be called from the ribbon. For example, many solutions will have a button on the ribbon that will launch the task pane. The behavior for launching the task pane would be an action.

We recommend that you create a basic solution manifest file initially with minimal settings. Then, after the basic solution works, extend it to include actions and layouts. In the basic 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 specific to Outlook. Fields that are not exact matches can also be specified, although they must be defined by an Outlook specific data type that Outlook recognizes (for example, Text, YesNo, or DateTime). These custom fields are created and surfaced in the form region in Outlook.

    • Accept the default form region settings so the BCS Client Runtime autogenerates a default form region for you. After your basic solution is working, you can extend it to include custom form regions.

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

Prerequisites

Creating a Solution Manifest

You can create the solution manifest either by using the BCS Artifact Generator Tool, or manually by using the template provided in the SharePoint 2010 SDK.

To use the BCS Artifact Generator Tool to create the solution manifest file

To create the solution manifest file based on the BDC model, download and then run the BCS Artifact Generator Tool. For more information, see BCS Artifact Generator Tool.

To use the solution manifest template to create the solution manifest file

  1. Locate the Template: Solution Manifest (Oir.config) 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 for editing in an XML editor. If opening the XML file in 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 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="AWWSExample" 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>
              <FormRegions xsl:type="Declarative:DeclarativeFormRegions" AutoGenerate="true"></FormRegions>
              <OutlookFolder Name="ContosoCustomers" FolderDisplayName="Contoso Customers" NativeType="FolderContacts" SubscriptionName="AWWSExampleCustomerSubscription" FolderName="ContosoCustomerFolderID" CanCreate="true" CanUpdate="true" CanDelete="false">
                <Views />
                <Associations />
              </OutlookFolder>
            </OfficeItemCustomizations>
          </ContextDefinition>
        </ContextDefinitionGroup>
      </ContextDefinitionGroups>
    </SolutionDefinition>
    
  4. Save and close the file.

You have successfully created the basic OIR.config needed for the intermediate declarative Outlook solution.

Next Steps

Step 4: Package and Deploy the Declarative Outlook Solution