模板:解决方案清单 (Oir.config)

上次修改时间: 2010年4月19日

适用范围: SharePoint Server 2010

以下是一个 Oir.config 模板,该模板可用于创建解决方案清单文件。利用此文件可以描述与 Microsoft Outlook 项目类型(如 Outlook"联系人"、"任务"、"公告"或"约会")相关联的用户界面 (UI)、行为和业务逻辑。例如,您可以指明,对于"联系人"Outlook 项目类型,应使用特定 UI(例如,Office 外部部件),并应在有人修改项目时从外部系统调用特定方法(例如 UpdateCustomerInstance(ID, NewInstanceValues))。此模板仅包含基本设置,可扩展为包括自定义窗体区域、布局、操作等。

<?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">
  <!-- SolutionID is the identifier for this solution and must be unique among other solutions installed on the user's machine. This can be a GUID. The solution ID may be used to locate in the log errors and warnings pertaining to this solution. -->
  <!-- SolutionDisplayName is displayed in the Outlook user interface. -->
  <SolutionSettings SolutionId="EnterSolutionID" SolutionDisplayName="EnterSolutionDisplayName" SolutionVersion="1.0.0.0"/>
  <ContextDefinitionGroups>
    <!-- ItemType can be OutlookContact, OutlookAppointment, OutlookTask, OutlookPost, or EntityView. -->
    <!-- Group the External Content Types in your solution by the ItemType. Then, for each ItemType in your solution, define a ContextDefinitionGroup. -->
    <!-- If there are external content types that need to be displayed in the context of a task pane only, use EntityView. It is used for showing related information in the Outlook task pane. -->
    <ContextDefinitionGroup xsl:type="Declarative:DeclarativeContextDefinitionGroup" ItemType="EnterItemType" >
      <!-- ContentType is the type name of this context in Outlook. The value that you specify here is used by the BCS runtime to identify which context the Outlook item belongs to. -->
      <!-- This must be unique among other solutions installed on the user's machine.-->
      <!-- ContentType can be the same as the External Content Type name but it does not have to be. You can use your own naming convention. -->
      <ContextDefinition xsl:type="Declarative:DeclarativeContextDefinition" ContentType="EnterContentType">
        <Entities>
          <!-- Note that a ContextDefinition maps to one external content type. The Entities element can have only one Enitty definition. -->
          <!-- You can have only one entity under a ContextDefinition. If you have more than one entity, use multiple ContextDefinitions and ContextDefinitionGroups as needed. -->
          <!—Now, for the external content type that maps to this ContextDefiniton, list what fields you are interested in. You might need to reference the BDC Model when filling this section. -->
          <Entity Name="EnterUniqueNameForEntity" EntityTypeName="EnterEntityNameFromModel" EntityTypeNamespace="EnterEntityNamespaceNameFromModel" Description="EnterDescription">
            <View Name="EnterUniqueNameForView" ViewName="EnterSpecificFinderInstanceNameFromModel" Description="EnterDescription" IsPrimary="true">
              <PromotedProperty Name="EnterUniqueNameForProperty" ViewInstancePath="EnterTypeDescriptorNameFromModel" OfficeItemPropertyName="EnterUniqueNameForProperty" ReadOnly="EntertrueORfalse" />
             <!-- List each field that is returned by the SpecificFinder that you are interested in showing in Outlook.  -->
            </View>
          </Entity>
        </Entities>
        <!-- In OutlookItemCustomizations, specify how those fields should appear in Outlook and what other customizations you need in Outlook. -->
        <!-- MessageClass is used to identify the form that should be used to display the item. It follows the format: IPM.<OutlookItemType>.<ContentTypeName>. Example: IPM.Contact.Customer -->
        <!-- ItemDisplayName is displayed in the Outlook user interface. -->
        <OfficeItemCustomizations xsl:type="OutlookItemCustomizations" ItemTypeDisplayName="EnterItemTypeDisplayName" MessageClass="EnterMessageClass">
          <OfficeItemProperties>
            <-- The OfficeItemProperty element is used to describe how each field of an external content type is displayed in Outlook. -->
            <!-- List each property from the Entity section that can be mapped to a default Outlook property. For the supported Outlook properties, see this topic. -->
            <!-- For a list of supported data types, see this topic. -->
            <!-- Properties that cannot be mapped to a default Outlook property still need to be listed and their data types should be specified. -->
            <OfficeItemProperty Name="EnterOfficeItemPropertyNameFromEntitySection" PropertyName="EnterOutlookPropertyName" PropertyType="EnterPropertyType" />
          </OfficeItemProperties>
          <!-- The properties that cannot be mapped to Outlook properties are displayed by Outlook in a separate form region or in an adjoining form region. -->
          <!-- AutoGenerate = "true" tells BCS to auto-generate Outlook forms. -->
          <FormRegions xsl:type="Declarative:DeclarativeFormRegions" AutoGenerate="true"></FormRegions>
          <-- In the OutlookFolder element, describe the Outlook folder that will contain the external data.-->
          <OutlookFolder Name="EnterNameForFolder" FolderDisplayName="EnterDisplayNameForFolder" NativeType="FolderContacts" SubscriptionName="EnterSubscriptionName" FolderName="EnterOutlookFolderName" CanCreate="EntertrueORfalse" CanUpdate="EntertrueORfalse" CanDelete="EntertrueORfalse">
            <Views />
            <Associations />
          </OutlookFolder>
        </OfficeItemCustomizations>
       </ContextDefinition>
      </ContextDefinitionGroup>
  </ContextDefinitionGroups>
</SolutionDefinition>