IT tutorials
 
Technology
 

Sharepoint 2010 : Connecting to BCS Data Using SharePoint Designer (part 2) - Create an External Content Type - Define SpecificFinder Operation

1/16/2014 3:01:44 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

3. Create an External Content Type

Now that you understand what BCS is and how the BDC service uses metadata to connect to external systems, you’re ready to put this knowledge into practice by creating an external content type using SharePoint Designer.

  1. In SharePoint Designer, connect to the new site that we created earlier. From the Site Objects menu, choose External Content Types:

  2. From the ribbon, in the New section, select External Content Type. In the page that appears, double-click New External Content Type next to the Name label and change the name to Model.

  3. From the ribbon, select Operations Design View. You’ll notice that the title of the window changes to Model, confirming that the name change has been applied. In the window that appears, click the Add Connection button. In the dialog that appears, set the Data Source Type to SQL Server, as shown; then click OK to continue.

  4. In the SQL Server Connection dialog, enter the name of your SQL server in the Database Server text box. For example, if you’re using the local SQL Express instance, you will type .\SQLExpress. In the Database Name text box, type AdventureWorks. Accept the default connection option of Connect With User’s Identity. Click on OK to create the connection.

Define SpecificFinder Operation
  1. After the connection has been verified, in the Data Source Explorer tab, you’ll be able to see the objects in the database. Expand the Tables node and then scroll down to the ProductModel table. Right-click the table, and in the context menu, you’ll see a number of options for defining operations on the ProductModel entity. Select New Read Item Operation.

  2. The Read Item Wizard will start, where you can define the metadata for a new SpecificFinder operation. In the Operation Name text box, type Read Item. Click Next to continue.

  3. On the Input Parameters page, you’ll notice a few important things:

    • ProductModelID is highlighted as an identifier. Each entity must define at least one identifier, though more than one identifier can be defined. For example, if you have a many-many relationship between two tables in a database, you may have a join table with a compound primary key. In this case, you’d have two identifiers.

    • Each item has a Display Name and Default Value option. Changing the Display Name in this page has no effect when creating external lists since the display name used by SharePoint is taken from the return values. Changing the Default Value will apply a default if the input parameter is null.

    Accept the default settings by clicking Next to move to the next page.

  4. On the Return Parameter page, notice a few more options:

    • Each field can be checked or unchecked, although unchecking the ProductModelID yields an error since each entity must have an identifier. Unchecking other fields may raise a warning if the field is not nullable in the underlying table, because updates and additions will be impossible since a value is required by the database schema.

    • Remember that even though we’re defining a SpecificFinder operation, unchecking columns here affects the overall definition of the entity. This means that it will not be possible to add or update values in fields that are unchecked even though the operations to perform these actions are defined separately. In effect, the SpecificFinder defines the columns of any external lists created from the External Content Type and consequently the columns used when adding and editing data.

    • A number of parameters appear for each field, including a Map to Identifier checkbox. Identifiers are defined in metadata separately and must be mapped to fields using this option.

    • The Display Name property defines the column name as it appears in External Lists created from the external content type. It also defines the text on the label that appears next to the item in add and edit forms.

      Click Finish to complete the creation of the Read Item operation.

Note

If we had an additional entity that could be correlated by using a particular field—such as Name—you would imagine that we could flag Name as an identifier, allowing associations between the entities to be made. However, this change has some undesirable implications: since Name is now an identifier, we effectively have a compound primary key. This means that all associations would be created based on both the Name and ProductModelID fields. It would not be possible to create an association based on one field or the other in isolation, thus defeating the object of the change.


Define Finder Operation

Now that we have defined a SpecificFinder operation to retrieve individual items from our data source, the next requirement for creating an external list is to define a Finder operation. The external list, like all other lists in SharePoint, makes use of the XsltListViewWebPart to render the contents of the list. However, rather than retrieving the list contents from the SharePoint database, the View definition contains a Method element specifying the name of a Finder operation that’s been defined on the external content type.

Creating a Finder operation follows a similar process to the creation of the SpecificFinder operation:

  1. Right-click a table on which to define the operation and then select the type of operation from the context menu. In this case, we’ll create a new Read List operation on the ProductModel table.

  2. In the wizard that appears, set the Operation Name to Read List, and then click Next to continue.

  3. On the Filter Parameters Configuration page, you’ll notice in the Errors and Warnings section a warning message relating to the creation of a limit filter. By default, a limit filter is not created, and this has implications when creating external lists. The default maximum number of rows that can be supported by an external list is 2000. If the Finder operation returns more rows than this, we’ll end up with a pretty cryptic web part error when we try to view the data in our external list.

Tip

Even when external lists are not required, by not setting a filter, we’re allowing the BDC service to return all rows in a table. In most cases, this would represent a significant waste of system resources.

 
Others
 
- Sharepoint 2010 : Connecting to BCS Data Using SharePoint Designer (part 1) - Associations, Stereotypes
- Sharepoint 2010 : Business Connectivity Services - Business Data Catalog in MOSS 2007
- Sharepoint 2013 : Creating List Views - Specify How Folders Will Be Used in a View
- Sharepoint 2013 : Creating List Views - Specify a Different Item Style for a View
- Sharepoint 2013 : Creating List Views - Specify Totals for a View
- Sharepoint 2013 : Creating List Views - Specify How Items in a View Are Grouped
- Sharepoint 2013 : Creating List Views - Specify How Items in a View Are Filtered
- PowerShell for SharePoint 2013 : Work Management Service (part 2) - Get the Identity of the Work Management Service Application Proxy,Get a Specific Work Management Service Application Proxy Instance
- PowerShell for SharePoint 2013 : Work Management Service (part 2) - Configure the Search Query Threshold , Configure the User Synchronization Per Server
- PowerShell for SharePoint 2013 : Work Management Service (part 1) - Get a Specific Work Management Service Application Instance , Configure the Refresh Threshold
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us