<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Jyoti Pawan's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jysaikia/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jysaikia/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:40:14 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>A step by step guide in designing BCS entities by using a SQL stored procedure</title>
      <link>https://docs.microsoft.com/archive/blogs/jysaikia/a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure</link>
      <pubDate>Wed, 15 Dec 2010 01:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Jyoti Pawan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jysaikia/2010/12/15/a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure/</guid>
      <description><![CDATA[In this article, we will see how to design a SharePoint BCS entity from a SQL stored procedure that...]]></description>
      <content:encoded><![CDATA[<p>In this article, we will see how to design a SharePoint BCS entity from a SQL stored procedure that takes some inputs and returns a list of records. The scope of the article is to show the use of OOB features provided by SharePoint Server and SharePoint designer to achieve this. We will also see how to use the OOB Business Data List web part to display the output of the stored procedure. </p>
<h2><span style="color: #008000;">Contents</span></h2>
<p><span style="color: #008000;"><a href="#Overview">Overview</a></span></p>
<p><span style="color: #888888;"><a href="#VerifyApplication">Verify Web Application settings</a></span></p>
<p><span style="color: #008000;"><a href="#ConfigureBCS">Configure Business Data Connectivity service</a></span></p>
<p><span style="color: #008000;"><a href="#CreateSP">Create Stored Procedure</a></span></p>
<p><span style="color: #008000;"><a href="#CreateECT">Create External Content Type</a></span></p>
<p><span style="color: #008000;"><a href="#VerifyECT">Verify the Content Type in the Central Admin</a></span></p>
<p><span style="color: #008000;"><a href="#UseWebPart">Use Business Data List web part to show external data</a></span></p>
<p><span style="color: #008000;"><a href="#ConnectWebParts">Connecting Business Data List web part with other web parts</a></span></p>
<p><span style="color: #008000;"><a href="#Resources">Additional Resources</a></span></p>
<p sizset="0" sizcache="4"><span style="color: #888888;"></span>
<p>&nbsp;</p>
<p sizset="0" sizcache="1"><span style="color: #888888;"></span><a name="Overview">
<h2><span style="color: #008000;">Overview</span></h2>
</a>
<p>Business Connectivity Services are a set of services and features that provide a way to connect SharePoint solutions to sources of external data and to define external content types that are based on that external data. This article contains a step by step guide to design an External Content Type from SQL stored procedures. The article will broadly cover the below topics,</p>
<ul>
<li>Define stored procedures to be used as a base for the external content type.</li>
<li>Create External Content Type from the stored procedures. Add a "Read List" operation and show use of filters.</li>
<li>Create a custom page to show a list of items from the content type. Show use of "Business Data List" web part and filters. </li>
<li>Customizing the Business Data List web part by connecting it to custom Filter web parts.</li>
</ul>
<p>Before beginning, you should have the following:</p>
<ul>
<li>Access to SharePoint 2010 Central Administration, including the business data connectivity service.</li>
<li>Access to SharePoint Designer.</li>
<li>A SharePoint 2010 web application with a site collection (blank site template). For more information, see <a href="https://technet.microsoft.com/en-us/library/cc263094(office.14).aspx">Create a site collection (Office SharePoint Server)</a>. We will be using the <b>Sharepoint - 80</b> application for these examples.</li>
<li>Access to Microsoft SQL Server. For our examples we will consider that the SQL server is installed locally.&shy;</li>
<li>A sample database for Microsoft SQL Server (<i>"AdventureWorks2008R2"</i> will be used in this example. See <a href="https://msftdbprodsamples.codeplex.com/releases/view/55926">Sample Databases for Microsoft SQL Server 2008R2</a> to install.)</li>
</ul>
<p>The objective of this exercise is to write a Stored Procedure that returns a list of Sales Orders from the AdventureWorks database and display these results by using the Business Data List web part. We will also see how we can use various filters (Sales Territory and Sales Year for our example) to limit the result set returned by the stored procedure.</p>
<p><a name="VerifyApplication">
<h2 style="MARGIN: 24pt 0in 0pt"><span style="color: #008000;">Verify Web Application settings</span></h2>
</a></p>
<p>Follow these steps to verify that the web application that will be used to display the external data is properly configured to use the Business Data Connectivity service.</p>
<p>1. Start SharePoint 2010 Central Administration.</p>
<p>2. Click <b>Manage web applications</b> under the <b>Application Management</b> heading.</p>
<p>3. Select the web application you will be using for these examples (e.g. Sharepoint - 80).</p>
<p>4. Click <b>Service Connections</b> in the ribbon.<br /><img height="153" width="450" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/8156.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/8156.temp.png" border="0" /></p>
<p><b></b></p>
<p>5. You need to have checks by <b>Business Data Connectivity Service</b>. If it is not checked, check it and click <b>OK</b>. If you cannot check them, use the drop down at the top to change from <b>default</b> to <b>custom</b> first.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2451.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2451.temp.png" border="0" /></p>
<p><a name="ConfigureBCS">
<h2><span style="color: #008000;">Configure Business Data Connectivity service</span></h2>
</a></p>
<p>Follow these steps to verify the settings for Business Data Connectivity service.</p>
<p>1. Start SharePoint 2010 Central Administration.</p>
<p>2. Click Manage service applications under the Application Management heading.</p>
<p>3. In the Name column, click on Business Data Connectivity Service. Then click on <b>Manage</b> in the ribbon.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/6366.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/6366.temp.png" border="0" /></p>
<p>4. On the edit page, click <b>Set Metadata Store Permissions</b> in the <b>Permissions</b> group in the ribbon.</p>
<p>5. If the account you will be using is not shown in the dialog, type the account name in the text box next to the <b>Add</b> button. Then click <b>Add</b>.</p>
<p>6. In the bottom list, check all of the check boxes (<b>Edit</b>, <b>Execute</b>, <b>Selectable In Clients</b> and <b>Set Permissions</b>). In this example we have given all permissions to <b>NT Authority/Authenticated Users</b>.</p>
<p>7. Check the box for <b>Propagate permissions to all BDC Models, External Systems and External Content Types in the BDC Metadata Store</b>. Then click <b>OK.</b></p>
<p>&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2117.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2117.temp.png" border="0" /></p>
<h1></h1>
<p><a name="CreateSP">
<h2><span style="color: #008000;">Create Stored Procedure</span></h2>
</a></p>
<p>In this step, we will be using the '<i>AdventureWorks2008R2' </i>database to create a stored procedure that takes two optional parameters (Status and Territory) and returns a list of Sales Orders. The code to create the procedure is below.</p>
<h2></h2>
</p>
</p>
<table border="1">
<tbody>
<tr>
<td>
<p><span style="font-family: Courier New;">USE [AdventureWorks2008R2]<br />GO<br /><br />/****** Object:&nbsp; StoredProcedure [dbo].GetSalesOrders]&nbsp;&nbsp;&nbsp; *****/<br />IF&nbsp; EXISTS (SELECT * FROM sys.objects WHERE&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object_id = OBJECT_ID(N'[dbo].[GetSalesOrders]') AND type in (N'P', N'PC'))<br />DROP PROCEDURE [dbo].[GetSalesOrders]<br />GO<br /></span></p>
<p><span style="font-family: Courier New;">SET ANSI_NULLS ON<br />GO<br />SET QUOTED_IDENTIFIER ON<br />GO<br /><br />CREATE PROCEDURE [dbo].[GetSalesOrders]&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @territory nvarchar(200) = null,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @year int = 2008,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @pageNo int = 1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @limit int = 200<br />AS<br />BEGIN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET NOCOUNT ON;<br /></span><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DECLARE @startIndex int<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET @startIndex = ((@pageNo - 1) * @limit) + 1<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DECLARE @endIndex int<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET @endIndex = @startIndex + @limit - 1<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DECLARE @salesTerritory nvarchar(200) = null<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF @territory IS NOT null&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET @salesTerritory = '%' + @territory + '%'<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WITH [CTE] AS (<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT ROW_NUMBER() OVER (ORDER BY [OrderDate] DESC) AS [RowNumber]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[SalesOrderNumber]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[OrderDate]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[DueDate]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[ShipDate]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[dbo].[ufnGetSalesOrderstatusText]([Status]) AS [Status]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[SO].[CustomerID]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[CUST].[LastName] + ', ' + [CUST].[FirstName] + ' '&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + ISNULL([CUST].[MiddleName], '') AS [Customer]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[ST].[Name] AS [SalesTerritory]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[SubTotal]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TaxAmt]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[Freight]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,[TotalDue]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM [AdventureWorks2008R2].[Sales].[SalesOrderHeader] AS [SO]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INNER JOIN [AdventureWorks2008R2].[Sales].[Customer] AS [SC]&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON [SO].[CustomerID] = [SC].[CustomerID]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN [AdventureWorks2008R2].[Person].[Person] AS [CUST]&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON [SC].[PersonID] = [CUST].[BusinessEntityID]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEFT JOIN [AdventureWorks2008R2].[Sales].[SalesTerritory] AS [ST]&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON [SO].[TerritoryID] = [ST].[TerritoryID]<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE DATEPART(year, [SO].[OrderDate]) = @year<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND [ST].[Name] LIKE ISNULL(@salesTerritory, [ST].[Name])<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT * FROM [CTE]&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE [CTE].[RowNumber] &gt;= @startIndex<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND [CTE].[RowNumber] &lt;= @endIndex<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;<br />END<br />GO</span></p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1"><a name="CreateECT">
<h2><span style="color: #008000;">Create External Content Type</span></h2>
</a>
<p>In this step, we will use <b>SharePoint Designer</b> to create an External Content Type from the stored procedure created in the previous step.</p>
<p>1. Browse to the "<b>SharePoint - 80"</b> site in your development environment.</p>
<p>2. On the <b>Site Actions</b> drop-down, click <b>Edit in SharePoint Designer</b>.</p>
<p>3. In the <b>Navigation</b> pane, click <b>External Content Types</b>.</p>
<p>4. In the <b>New</b> group of the ribbon, click <b>External Content Type</b>.</p>
<p>5. In the <b>External Content Type Information</b> group, edit each of the parameters as below and leave the remaining to their default settings.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Name</b></p>
</td>
<td width="319" valign="top">
<p>SalesOrders</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Display Name</b></p>
</td>
<td width="319" valign="top">
<p>SalesOrders</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Namespace</b></p>
</td>
<td width="319" valign="top">
<p><a href="https://contoso.com/">https://contoso.com</a></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Version</b></p>
</td>
<td width="319" valign="top">
<p>1.0.0.0</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;6. Next to <b>External System</b>, click <b>Click here to discover external data sources and...</b></p>
<p><img height="336" width="509" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/3603.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/3603.temp.png" border="0" /></p>
<p>&nbsp;7. Click on the <b>Add Connection</b> button.</p>
<p>8. In the <b>External Data Source Type Selection </b>dialog, choose <b>SQL Server</b> in the drop down. Click <b>OK</b>.</p>
<p>&nbsp;<img height="234" width="516" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/7776.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/7776.temp.png" border="0" /></p>
<p>9. In the <b>SQL Server Connection</b> dialog, edit the parameters as below and click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Database Server</b></p>
</td>
<td width="319" valign="top">
<p>(local)</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Database Name</b></p>
</td>
<td width="319" valign="top">
<p>AdventureWorks2008R2</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Name</b></p>
</td>
<td width="319" valign="top">
<p>AdventureWorks2008R2_SalesOrders</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img height="187" width="326" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/4237.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/4237.temp.png" border="0" /></p>
<p>&nbsp;<i>Note: This connection will use the service account to connect to the database. In a production configuration, you may want to use one of the impersonated identities so that database access is controlled independently from that account.</i><i></i></p>
<p>10. In the Data Source explorer, expand the <b>AdventureWorks2008R2_SalesOrders</b> to find the stored procedure <b>GetSalesOrders</b> under the <b>Routines</b> node.</p>
<p>&nbsp;<img height="324" width="262" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/1220.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/1220.temp.png" border="0" /></p>
<p>11. Right-click on <b>GetSalesOrders</b> to open a pop-up menu and click <b>New Read List Operation</b>.</p>
<p>12. Click the <b>Next &gt;</b> button at the bottom of the <b>Read List</b> dialog.</p>
<p>13. On the <b>Input Parameters</b> page, click <b>@territory</b> in the <b>Data Source Elements</b> pane.</p>
<p>14. In the <b>Properties</b> pane, edit the values as below. Then, click <b>Click to Add </b>against the Filter property.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Display Name</b></p>
</td>
<td width="319" valign="top">
<p>Sales Territory</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Default Value</b></p>
</td>
<td width="319" valign="top">
<p>&lt;&lt;Null&gt;&gt;</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/3833.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/3833.temp.png" border="0" /></p>
<p>15. In the <b>Filter Configuration </b>dialog, select <b>New Filter</b>. Edit the properties as below leaving the rest to their default. Then click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>New Filter</b></p>
</td>
<td width="319" valign="top">
<p>Sales Territory</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filter Type</b></p>
</td>
<td width="319" valign="top">
<p>Comparison</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Operation</b></p>
</td>
<td width="319" valign="top">
<p>Equals</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img height="226" width="483" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/1667.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/1667.temp.png" border="0" /></p>
<p>16. Back in the <b>Input Parameters</b> page, click <b>@year</b> in the <b>Data Source Elements</b> pane.</p>
<p>17. In the <b>Properties</b> pane, edit the values as below. Then click, <b>Click to Add </b>against the Filter property as shown below.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Display Name</b></p>
</td>
<td width="319" valign="top">
<p>Sales Year</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Default Value</b></p>
</td>
<td width="319" valign="top">
<p>2008</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>18. In the <b>Filter Configuration </b>dialog, select <b>New Filter</b>. Edit the properties as below leaving the rest to their default. Then click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>New Filter</b></p>
</td>
<td width="319" valign="top">
<p>Sales Year</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filter Type</b></p>
</td>
<td width="319" valign="top">
<p>Comparison</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Operation</b></p>
</td>
<td width="319" valign="top">
<p>Equals</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img height="222" width="489" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/7181.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/7181.temp.png" border="0" /></p>
<p>19. Similarly, on the <b>Input Parameters</b> page, click <b>@pageNo</b> in the <b>Data Source Elements</b> pane.</p>
<p>20. In the <b>Properties</b> pane, edit the values as below. Then click, <b>Click to Add </b>against the Filter property as shown below.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Display Name</b></p>
</td>
<td width="319" valign="top">
<p>Page No</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Default Value</b></p>
</td>
<td width="319" valign="top">
<p>1</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>21. In the <b>Filter Configuration </b>dialog, select <b>New Filter</b>. Edit the properties as below leaving the rest to their default. Then click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>New Filter</b></p>
</td>
<td width="319" valign="top">
<p>Page No</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filter Type</b></p>
</td>
<td width="319" valign="top">
<p>Comparison</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Operation</b></p>
</td>
<td width="319" valign="top">
<p>Equals</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img height="217" width="486" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/1768.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/1768.temp.png" border="0" /></p>
<p>22. Back on the <b>Input Parameters</b> page, click <b>@limit</b> in the <b>Data Source Elements</b> pane.</p>
<p>23. In the <b>Properties</b> pane, edit the values as below. Then click, <b>Click to Add </b>against the Filter property as shown below.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Display Name</b></p>
</td>
<td width="319" valign="top">
<p>Limit</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Default Value</b></p>
</td>
<td width="319" valign="top">
<p>200</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>24. In the <b>Filter Configuration </b>dialog, select <b>New Filter</b>. Edit the properties as below leaving the rest to their default. Then click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>New Filter</b></p>
</td>
<td width="319" valign="top">
<p>Limit Filter</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filter Type</b></p>
</td>
<td width="319" valign="top">
<p>Limit</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Is Default</b></p>
</td>
<td width="319" valign="top">
<p>Checked</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p><img height="217" width="493" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/4087.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/4087.temp.png" border="0" />&nbsp;</p>
<p>25. Click the <b>Next &gt;</b> button at the bottom of the <b>Read List</b> dialog.</p>
<p>26. On the <b>Return Parameters</b> page, click <b>SalesOrderNumber</b> in the <b>Data Source Elements</b> pane.</p>
<p>27. In the <b>Properties</b> pane, check the box for <b>Map to Identifier</b> and <b>Show In Picker</b>.</p>
<p><img height="218" width="503" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/4478.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/4478.temp.png" border="0" />&nbsp;</p>
<p>28. Click the <b>Finish</b> button.</p>
<p>29. Click the <b>Save</b> button in the Quick Access Toolbar to commit the changes.</p>
<p>&nbsp;<img height="142" width="349" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/7762.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/7762.temp.png" border="0" /></p>
<p><a name="VerifyECT">
<h2><span style="color: #008000;">Verify the Content Type in the Central Admin</span></h2>
</a></p>
<p>In this step, we will verify the various settings for the <b>External Content Type</b> created in the previous step. </p>
<p>1. Start SharePoint 2010 Central Administration.</p>
<p>2. Click Manage service applications under the Application Management heading.</p>
<p>3. In the Name column, click on Business Data Connectivity Service. Then click on Manage in the ribbon.</p>
<p>4. In the service application information page for the Business Data Connectivity service, verify an entry for <b>SalesOrders</b>. Click on the entry to go to the External Content Type information page. Verify the following property values, </p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><strong>Property</strong></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>External System</b></p>
</td>
<td width="319" valign="top">
<p>AdventureWorks2008R2_SalesOrders</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filters on Finder Methods</b></p>
</td>
<td width="319" valign="top">
<p>Limit Filter (Type: Limit)</p>
<p>Page No (Type: Comparison)</p>
<p>Sales Territory (Type: Comparison)</p>
<p>Sales Year (Type: Comparison)</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p>&nbsp;<img height="447" width="378" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5153.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5153.temp.png" border="0" /></p>
<p>5. Next, to verify the External System (the Database connection) setting, select <b>External Systems</b> in the drop down in the ribbon.</p>
<p><img height="117" width="488" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5228.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5228.temp.png" border="0" />&nbsp;</p>
<p>6. Next, to verify the External System (the Database connection) setting, select <b>External Systems</b> in the drop down in the ribbon. The service application information page should list an entry for <b>AdventureWorks2008R2_SalesOrders</b>.</p>
<p><img height="178" width="439" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5635.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5635.temp.png" border="0" />&nbsp;</p>
<p>7.&nbsp;Click on the entry to go to the External System Information page. There should be one instance entry as shown below.</p>
<p><img height="150" width="409" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2146.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2146.temp.png" border="0" />&nbsp;</p>
<p>8. Click on the instance name to go to the property settings page. Verify the property as below,</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Access Provider</b></p>
</td>
<td width="319" valign="top">
<p>SqlServer</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Authentication Mode</b></p>
</td>
<td width="319" valign="top">
<p>User's Identity</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Database Server</b></p>
</td>
<td width="319" valign="top">
<p>(local)</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Initial Database Name</b></p>
</td>
<td width="319" valign="top">
<p>AdventureWorks2008R2</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p><img height="280" width="308" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/8407.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/8407.temp.png" border="0" /></p>
<p><i>Note: This connection will use the service account to connect to the database.</i></p>
<p><a name="UseWebPart">
<h2><span style="color: #008000;">Use Business Data List web part to show external data</span></h2>
</a></p>
<p>In this step we will use a <b>Business Data List</b> web part to display a list of sales orders. </p>
<p>1. Open the web application <b>SharePoint - 80</b>. From the <b>Site Actions</b> menu, click <b>Edit Page</b>.</p>
<p>2. Click on <b>Add a Web Part</b>, in the left web part zone.</p>
<p>3. From the web parts selection menu, select <b>Business Data</b> in the <b>Categories</b> section and then from the list of web parts select <b>Business Data List</b> and click <b>Add</b>.</p>
<p><img height="176" width="517" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/6114.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/6114.temp.png" border="0" />&nbsp;</p>
<p>4. From the web part's action menu, click on <b>Edit Web Part</b> to open the tool pane for this web part.</p>
<p>5. In the <b>Business Data List</b> section of the edit pane, click on the picker icon next to Type field to bring up the External Content Type Picker dialog form.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/8233.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/8233.temp.png" border="0" />&nbsp;</p>
<p>6. In the dialog form, select the content type created in the previous steps and click OK.</p>
<p><img height="132" width="510" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2110.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2110.temp.png" border="0" />&nbsp;</p>
<p>7. For the <b>View</b> Property, select <b>Default (SalesOrders Read List)</b> in the drop down.</p>
<p><img height="155" width="215" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2677.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2677.temp.png" border="0" />&nbsp;</p>
<p>8. Edit the <b>Title</b> property of the web part to <b>AdventureWorks Sales Orders</b> and then click OK in the web part's tool pane.</p>
<p>9. In the web part's toolbar, click on the <b>Edit View</b> link.</p>
<p><img height="98" width="286" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/0488.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/0488.temp.png" border="0" />&nbsp;</p>
<p>10. In the <b>Edit View</b> page, select <b>Retrieve All Items</b> option for the <b>Items to Retrieve</b> category. Also, enter 200 for the <b>Item Limit</b> category. Leave the remaining fields to their default values. Then click <b>OK</b>.</p>
<p><img height="366" width="462" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5355.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5355.temp.png" border="0" />&nbsp;</p>
<p>11.&nbsp;This will bring out a list of sales orders. To filter the result set for Sales Territory 'Canada' and for the year '2005', first enter Canada against the Sales Territory option. Then click on the <b>Add </b>link.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/7802.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/7802.temp.png" border="0" />&nbsp;</p>
<p>12. This adds another filtering option. In the second option, select 'Sales Year' in the first drop down and then enter '2005' in the value text box. Then click on the <b>Retrieve Data</b> link to get a filtered list of records.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/8055.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/8055.temp.png" border="0" />&nbsp;</p>
<p><a name="ConnectWebParts">
<h2><span style="color: #008000;">Connecting Business Data List web part with other web parts</span></h2>
</a></p>
<p>In this example we will see how we can connect the Business Data List web part used in the previous steps to another web part. In this step we will use a <b>Choice Filter</b> web part, which will be used to pass the 'Sales Territory' filter value to the Business Data List web part. Note that, in real applications this may not be necessary as this feature is already built in to the Business Data List web part as shown in our previous step. </p>
<p>1. Browse to the web page used in the previous step to display the use of Business Data List web part. From the <b>Site Actions</b> menu, click <b>Edit Page</b>.</p>
<p>2. Click on <b>Add a Web Part</b>, in the left web part zone.</p>
<p>3. From the web parts selection menu, select <b>Filters</b> in the <b>Categories</b> section and then from the list of web parts select <b>Choice Filter </b>and click <b>Add</b>.</p>
<p><img height="196" width="487" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5444.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5444.temp.png" border="0" />&nbsp;</p>
<p>4. From the <b>Choice Filter</b> web part's action menu, click on <b>Edit Web Part</b> to open the tool pane for this web part.</p>
<p>5. Edit the web part with the following properties. Leave rest of the properties to their default settings. Then click <b>OK</b>.</p>
</p>
</p>
</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="252" valign="top">
<p><b>Property</b></p>
</td>
<td width="319" valign="top">
<p><b>Value</b></p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Filter Name</b></p>
</td>
<td width="319" valign="top">
<p>Sales Territory</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Choices</b></p>
</td>
<td width="319" valign="top">
<p>Australia</p>
<p>Canada</p>
<p>Northwest</p>
</td>
</tr>
<tr>
<td width="252" valign="top">
<p><b>Show (Empty) value</b></p>
</td>
<td width="319" valign="top">
<p>Checked</p>
</td>
</tr>
</tbody>
</table>
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="4">
<p sizset="1" sizcache="1">
<p><img height="453" width="227" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2867.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2867.temp.png" border="0" />&nbsp;</p>
<p>6.&nbsp;From the actions menu of the <b>Choice Filter</b> web part, select "<b>Connections</b> -&gt; <b>Send Filter Values To</b>". This should display an option with "AdventureWorks Sales Order" web part. Select this option.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/3835.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/3835.temp.png" border="0" />&nbsp;</p>
<p>7. In the <b>Choose Connection</b> dialog form, select <b>Get Query Values From</b> in the Connection Type selection box. Then click <b>Configure</b>.</p>
<p><img height="183" width="367" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/3007.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/3007.temp.png" border="0" />&nbsp;</p>
<p>8. For the Consumer Field Name option in the next window, select <b>Sales Territory</b> and then click <b>Finish</b>.</p>
<p><img height="204" width="368" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/2844.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/2844.temp.png" border="0" />&nbsp;</p>
<p>9. To verify the connection, click on the filter button next to Sales Territory web part. This will bring up a dialog form with the choices entered in the previous step. Select Northwest option and then click <b>OK</b>.</p>
<p><img height="179" width="535" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/5545.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/5545.temp.png" border="0" />&nbsp;</p>
<p>10. This will refresh the Business Data List web part to list sales orders for Northwest Territory alone.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/39/1805.temp.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-42-39/1805.temp.png" border="0" />&nbsp;</p>
<p><a name="Resources">
<h2><span style="color: #008000;">Additional Resources</span></h2>
</a></p>
<p>For more information, see the following resources:</p>
<ul>
<li><a href="https://technet.microsoft.com/en-us/library/ee661742(office.14).aspx">Business Data Connectivity services administration</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/ee558413(office.14).aspx">Business Connectivity Services Schema Reference</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/ee557363(office.14).aspx">Stereotyped Operations Supported By BDC</a></li>
</ul>
</p>
</p>
</p>]]></content:encoded>
    </item>
  </channel>
</rss>