Authoring Step 6: Define the Region External ContentType
Applies to: SharePoint Server 2010
In this step, you will define an external content type named Region. The Region external content type is very straightforward with just CRUDQ methods.
Prerequisites
Authoring Step 5: Define the Customer External ContentType
To define the Region entity
Add the XML for the Region external content type after the Customer entity element. This XML defines the entity’s title, identifier, and a method to return regions.
<Entity Namespace="SampleWebService" Version="1.1.0.0" EstimatedInstanceCount="10000" Name="WSRegion" DefaultDisplayName="WSRegion"> <Identifiers> <Identifier TypeName="System.String" Name="RegionID" /> </Identifiers> <Methods> <Method IsStatic="false" Name="GetRegionByID"> <Parameters> <Parameter Direction="In" Name="id"> <TypeDescriptor TypeName="System.String" IdentifierName="RegionID" Name="id" DefaultDisplayName="RegionID" /> </Parameter> <Parameter Direction="Return" Name="GetRegionByID"> <TypeDescriptor TypeName="BCSServiceProxy.Region, http://air-mail/WSOrders2010/service.asmx?wsdl" Name="GetRegionByID"> <TypeDescriptors> <TypeDescriptor TypeName="System.String" ReadOnly="true" IdentifierName="RegionID" Name="RegionID" /> <TypeDescriptor TypeName="System.String" Name="Name" /> <TypeDescriptor TypeName="System.String" Name="Group" /> <TypeDescriptor TypeName="System.Decimal" Name="SalesLastYear"> <Properties> <Property Name="Decimal Digits" Type="System.Int32">4</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="SalesYTD"> <Properties> <Property Name="Decimal Digits" Type="System.Int32">4</Property> </Properties> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="SpecificFinder" ReturnParameterName="GetRegionByID" Default="true" Name="GetRegionByID" DefaultDisplayName="Read Item WSRegion"> <Properties> <Property Name="LastDesignedOfficeItemType" Type="System.String">None</Property> </Properties> </MethodInstance> </MethodInstances> </Method> <Method IsStatic="false" Name="GetRegions"> <FilterDescriptors> <FilterDescriptor Type="Wildcard" FilterField="Name" Name="WFilter"> <Properties> <Property Name="UsedForDisambiguation" Type="System.Boolean">false</Property> <Property Name="IsDefault" Type="System.Boolean">false</Property> <Property Name="CaseSensitive" Type="System.Boolean">false</Property> </Properties> </FilterDescriptor> </FilterDescriptors> <Parameters> <Parameter Direction="In" Name="name"> <TypeDescriptor TypeName="System.String" AssociatedFilter="WFilter" Name="name" /> </Parameter> <Parameter Direction="Return" Name="GetRegions"> <TypeDescriptor TypeName="BCSServiceProxy.Region[], http://air-mail/WSOrders2010/service.asmx?wsdl" IsCollection="true" Name="GetRegions"> <TypeDescriptors> <TypeDescriptor TypeName="BCSServiceProxy.Region, http://air-mail/WSOrders2010/service.asmx?wsdl" Name="GetRegionsElement"> <TypeDescriptors> <TypeDescriptor TypeName="System.String" ReadOnly="true" IdentifierName="RegionID" Name="RegionID" /> <TypeDescriptor TypeName="System.String" Name="Name"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="Group" /> <TypeDescriptor TypeName="System.Decimal" Name="SalesLastYear"> <Properties> <Property Name="Decimal Digits" Type="System.Int32">4</Property> </Properties> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="SalesYTD"> <Properties> <Property Name="Decimal Digits" Type="System.Int32">4</Property> </Properties> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="Finder" ReturnParameterName="GetRegions" Default="true" Name="GetRegions" DefaultDisplayName="WSRegion Read List"> <Properties> <Property Name="UseClientCachingForSearch" Type="System.String"></Property> <Property Name="RootFinder" Type="System.String"></Property> </Properties> </MethodInstance> </MethodInstances> </Method> </Methods> </Entity>