Fragmento XML: Uso de formato personalizado para representar tipos complejos en un modelo BDC
Última modificación: miércoles, 21 de abril de 2010
Hace referencia a: SharePoint Server 2010
En el ejemplo siguiente se muestra la definición de formato personalizado en el modelo de BDC.
Ejemplo
<Method Name="GetDefaultCustomerView" DefaultDisplayName="GetDefaultCustomerView€">
<Parameters>
<Parameter Direction="In" Name="CustomerId">
<TypeDescriptor TypeName="System.String" IdentifierName="CustomerId" Name="CustomerId" />
</Parameter>
<Parameter Direction="Return" Name="Customer">
<TypeDescriptor TypeName="WSProxyName.Customer, WSLobSystem-Formatter" ReadOnly="true" Name="CustomerDataRecord">
<Properties>
<Property Name="ComplexFormatting" Type="System.Boolean">true</Property>
</Properties>
<TypeDescriptors>
<TypeDescriptor TypeName="System.String" ReadOnly="true" IdentifierName="CustomerId" Name="CustomerId" DefaultDisplayName="CustomerId">
<Properties>
<Property Name="ShowInPicker" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor TypeName="WSProxyName.ContactInfo, WSLobSystem-Formatter" ReadOnly="true" Name="ContactInfo" DefaultDisplayName="ContactInfo">
<Properties>
<Property Name="FormatString" Type="System.String">{0} {1}, {2}, {3} {4}</Property>
<Property Name="ShowInPicker" Type="System.Boolean">true</Property>
</Properties>
<TypeDescriptors>
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="FirstName" DefaultDisplayName="FirstName" />
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="LastName" DefaultDisplayName="LastName" />
<TypeDescriptor TypeName="WSProxyName.Address, WSLobSystem-Formatter" ReadOnly="true" Name="Address" DefaultDisplayName="Address">
<TypeDescriptors>
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="StreetAddress" DefaultDisplayName="StreetAddress" />
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="City" DefaultDisplayName="City" />
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="ZipCode" DefaultDisplayName="ZipCode" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" ReadOnly="true" Name="Telephone" DefaultDisplayName="Telephone" />
</TypeDescriptors>
</TypeDescriptor>
<TypeDescriptor TypeName="System.DateTime" ReadOnly="true" Name="LastChanged" DefaultDisplayName="LastChanged">
<Properties>
<Property Name="HideInItemWebPartByDefault" Type="System.Boolean">true</Property>
<Property Name="HideInListWebPartByDefault" Type="System.Boolean">true</Property>
</Properties>
<Interpretation>
<NormalizeDateTime LobDateTimeMode="UTC" />
</Interpretation>
</TypeDescriptor>
<TypeDescriptor TypeName="System.Int32" ReadOnly="true" Name="EmployeeId" DefaultDisplayName="EmployeeId">
<Properties>
<Property Name="HideInItemWebPartByDefault" Type="System.Boolean">true</Property>
<Property Name="HideInListWebPartByDefault" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParameterName="Customer" Default="true" Name="GetDefaultCustomerView" DefaultDisplayName="GetDefaultCustomerView">
</MethodInstance>
</MethodInstances>
</Method>