Exemple XML : manifeste de la solution (oir.config)
Dernière modification : mercredi 21 avril 2010
S’applique à : SharePoint Server 2010
Voici un exemple de fichier de définition de solution (oir.config) pour un système externe de type base de données SQL Server. Il contient des définitions de contexte pour le type de contenu externe Commande de l’exemple de base de données SQL Server AdventureWorks 2005. Il montre comment utiliser un ensemble composé de ContextDefinition et OfficeItemCustomizations pour personnaliser une solution Microsoft Business Connectivity Services (BCS) qui doit s’exécuter sur Microsoft Outlook 2010.
Exemple
<?xml version="1.0" encoding="utf-8"?>
<SolutionDefinition xmlns="https://schemas.microsoft.com/office/2009/05/BusinessApplications/Manifest" xmlns:D="https://schemas.microsoft.com/office/2009/05/BusinessApplications/Manifest/DeclarativeExtensions"
xmlns:xsl="http://www.w3.org/2001/XMLSchema-instance">
<SolutionSettings SolutionId="ExampleSolution" SolutionVersion="1.0.0.0" SolutionDisplayName="AW 2005 Contact Order Solution"></SolutionSettings>
<ContextDefinitionGroups>
<ContextDefinitionGroup ItemType="OutlookTask">
<ContextDefinition ContentType="OutlookTaskOrder" >
<Entities>
<Entity EntityTypeName="Order" EntityTypeNamespace="AW2005" Name="OrderEntity" >
<View Name="AWTaskView" ViewName="Read Item" IsPrimary="true">
<PromotedProperty Name="SalesOrderIDProperty" ViewInstancePath="SalesOrderID" OfficeItemPropertyName="SalesOrderIDOfficeItemProperty" ReadOnly="true" />
<PromotedProperty Name="StartDateProperty" ViewInstancePath="OrderDate" OfficeItemPropertyName="StartDateOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="DueDateProperty" ViewInstancePath="DueDate" OfficeItemPropertyName="DueDateOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="DateCompletedProperty" ViewInstancePath="ShipDate" OfficeItemPropertyName="DateCompletedOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="OnlineOrderFlagProperty" ViewInstancePath="OnlineOrderFlag" OfficeItemPropertyName="OnlineOrderFlagOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="SubjectProperty" ViewInstancePath="SalesOrderNumber" OfficeItemPropertyName="SubjectOfficeItemProperty" ReadOnly="true" />
<PromotedProperty Name="PurchaseOrderNumberProperty" ViewInstancePath="PurchaseOrderNumber" OfficeItemPropertyName="PurchaseOrderNumberOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="AccountNumberProperty" ViewInstancePath="AccountNumber" OfficeItemPropertyName="AccountNumberOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="CustomerIDProperty" ViewInstancePath="CustomerID" OfficeItemPropertyName="CustomerIDOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="BillToAddressIDProperty" ViewInstancePath="BillToAddressID" OfficeItemPropertyName="BillToAddressIDOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="ShipToAddressIDProperty" ViewInstancePath="ShipToAddressID" OfficeItemPropertyName="ShipToAddressIDOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="ShipMethodIDProperty" ViewInstancePath="ShipMethodID" OfficeItemPropertyName="ShipMethodIDOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="CreditCardApprovalCodeProperty" ViewInstancePath="CreditCardApprovalCode" OfficeItemPropertyName="CreditCardApprovalCodeOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="SubTotalProperty" ViewInstancePath="SubTotal" OfficeItemPropertyName="SubTotalOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="TaxAmtProperty" ViewInstancePath="TaxAmt" OfficeItemPropertyName="TaxAmtOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="FreightProperty" ViewInstancePath="Freight" OfficeItemPropertyName="FreightOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="BodyProperty" ViewInstancePath="Comment" OfficeItemPropertyName="BodyOfficeItemProperty" ReadOnly="false" />
<PromotedProperty Name="ModifiedDateProperty" ViewInstancePath="ModifiedDate" OfficeItemPropertyName="ModifiedDateOfficeItemProperty" ReadOnly="false" />
</View>
</Entity>
</Entities>
<OfficeItemCustomizations ItemTypeDisplayName="AW-Order" MessageClass="IPM.Task.Order" xsl:type="OutlookItemCustomizations">
<OfficeItemProperties>
<OfficeItemProperty Name="SalesOrderIDOfficeItemProperty" PropertyName="SalesOrderID" PropertyType="OutlookInteger" />
<OfficeItemProperty Name="StartDateOfficeItemProperty" PropertyName="StartDate" PropertyType="OutlookDateTime" />
<OfficeItemProperty Name="DueDateOfficeItemProperty" PropertyName="DueDate" PropertyType="OutlookDateTime" />
<OfficeItemProperty Name="DateCompletedOfficeItemProperty" PropertyName="DateCompleted" PropertyType="OutlookDateTime" />
<OfficeItemProperty Name="OnlineOrderFlagOfficeItemProperty" PropertyName="OnlineOrderFlag" PropertyType="OutlookYesNo" />
<OfficeItemProperty Name="SubjectOfficeItemProperty" PropertyName="Subject" PropertyType="OutlookText" />
<OfficeItemProperty Name="PurchaseOrderNumberOfficeItemProperty" PropertyName="PurchaseOrderNumber" PropertyType="OutlookText" />
<OfficeItemProperty Name="AccountNumberOfficeItemProperty" PropertyName="AccountNumber" PropertyType="OutlookText" />
<OfficeItemProperty Name="CustomerIDOfficeItemProperty" PropertyName="CustomerID" PropertyType="OutlookInteger" />
<OfficeItemProperty Name="BillToAddressIDOfficeItemProperty" PropertyName="BillToAddressID" PropertyType="OutlookInteger" />
<OfficeItemProperty Name="ShipToAddressIDOfficeItemProperty" PropertyName="ShipToAddressID" PropertyType="OutlookInteger" />
<OfficeItemProperty Name="ShipMethodIDOfficeItemProperty" PropertyName="ShipMethodID" PropertyType="OutlookInteger" />
<OfficeItemProperty Name="CreditCardApprovalCodeOfficeItemProperty" PropertyName="CreditCardApprovalCode" PropertyType="OutlookText" />
<OfficeItemProperty Name="SubTotalOfficeItemProperty" PropertyName="SubTotal" PropertyType="OutlookCurrency" />
<OfficeItemProperty Name="TaxAmtOfficeItemProperty" PropertyName="TaxAmt" PropertyType="OutlookCurrency" />
<OfficeItemProperty Name="FreightOfficeItemProperty" PropertyName="Freight" PropertyType="OutlookCurrency" />
<OfficeItemProperty Name="BodyOfficeItemProperty" PropertyName="Body" PropertyType="OutlookText" />
<OfficeItemProperty Name="ModifiedDateOfficeItemProperty" PropertyName="ModifiedDate" PropertyType="OutlookDateTime" />
</OfficeItemProperties>
<FormRegions xsl:type ="D:DeclarativeFormRegions" AutoGenerate="true"></FormRegions>
<OutlookFolder StoreType="Solution" Name="Read Item" FolderDisplayName="Order list" NativeType="FolderTasks" SubscriptionName="OrderSubscription" FolderName="OrderFolderID" CanCreate="true" CanUpdate="true" CanDelete="true">
<Views />
</OutlookFolder>
</OfficeItemCustomizations>
</ContextDefinition>
</ContextDefinitionGroup>
</ContextDefinitionGroups>
</SolutionDefinition>