Thursday, September 8, 2016

Create External list using Business Data Connectivity in SharePoint 2013


 Business Connectivity Services (BCS)

Business Connectivity Services (BCS) is a set of components that enable you to work with data that resides outside of SharePoint. The BCS enables you to support the full range of create, retrieve, update, delete, and query (CRUDQ) data operations on external data sources from SharePoint and from Office client applications. We can also connect to database using web service, or data that is published as an OData source or any other types of external data. Business Connectivity Services (BCS) does this through out-of-the box or custom connectors.

External Content Types in BCS

The external content type is a core concept of Business Connectivity Services (BCS). Used throughout the functionality and services offered by BCS, external content types are reusable metadata descriptions of connectivity information and data definitions plus the behaviors you want to apply to a certain category of external data.

External content types enable you to manage and reuse the metadata and behaviors of a business entity, such as a customer or order from a central location, and enable users to interact with that external data and processes in a more meaningful way.

More details on content types in BCS see External content types in SharePoint 2013.

Follow the steps to Connect with SQL External Data Source


   1. Open the SharePoint Designer 2013:

 

Open SharePoint Designer

 

  2. Provide URL of Site to Open:

 

Site URL

 

  3. Provide Credentials to open the site:



  4. Create the new external content type and here provide the name of the content type


 External Content Type

 

 5. Click on the link text "Click here to discover the external data source operations:

 

Add Connection

 

 6. Click on the "Add Connection", we can create a new connection by selecting any like .NET Type, SQL Server, WCF Service.

 

Select SQL Server

 

 7.  Selected SQL server, and enter the Server credentials:


Server credentials

 

8. Now, see all the tables and views from the database.

 

views from the database

 

9. Following option to create operations against the database:

 

Database Operations

 

 10. Click on the Next button:

 

Operations

 

  11.   Parameters Configurations:

 

Parameters Config

 

 12.  Options for Filter parameters Configuration:


Filter Parameters Config

 

 13.  Now add new External List, Click on the "External List":

 

 External List

 

 

 14.  Select the Site and click OK:

 

 Select the Site

 

 15. Provide the list name and click OK:

 

list name

 

 16. Refresh the SharePoint site, see the external list here and click on the list:

 

 Access denied

 

 

We got error message here "Access denied by Business Connectivity."

 

Solution for Access denied by Business Connectivity Error

 

17. SharePoint central admin, click on the Manage service application:


 Manage service application

 

 18. Click on the Business Data Connectivity Service:

 

 BDC Service

 

19. Set the permission for list:

 

 Permission for list

 

20. Click OK button after setting the permissions:

 

setting the permissions

 

21. Refresh the site this will work. If error message like Login failed for user "NT AUTHORITY\ANONYMOUS LOGON".


Following way to resolve the “NT AUTHORITY\ANONYMOUS LOGON" Error

 

22. Change the connection properties, the Authentication mode selects the value 

"BDC Identity"

.

BDC Identity

 

23. Open SharePoint Management Shell and run following


SharePoint 2013ManagementShell

$bdc = Get-SPServiceApplication |

where {$_ -match “Business Data Connectivity Service”}

$bdc.RevertToSelfAllowed = $true

$bdc.Update();

Now it will work.

 

Completed

 

24. If still error as following:

Possible Error


Following way to resolve the errors

25. Open SharePoint Management Shell and run the following -


SharePoint 2013ManagementShell

$bcs = Get-SPServiceApplicationProxy | where{$_.GetType().FullName

-eq (‘Microsoft.SharePoint.BusinessData.SharedService.’ + ‘BdcServiceApplicationProxy’)}

$BCSThrottle = Get-SPBusinessDataCatalogThrottleConfig -Scope database

-ThrottleType items -ServiceApplicationProxy $bcs

Set-SPBusinessDataCatalogThrottleConfig -Identity $BCSThrottle -Maximum 1000000 -Default 20000

Finally it will work.

 

Thank you very much

          Fahadullah Karimi

         SharePoint Specialist

Configure Business Data Connectivity Service in SharePoint 2013 Custom Search Apps Using REST API in SharePoint 2013

No comments:

Post a Comment