Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Posts Tagged ‘bcs’

BCS External Content Type Configuration

Posted by Paul on February 7, 2016

 

In this article we can explore how to configure BCS External Content Type in SharePoint 2013.

BCS

BCS (Business Connectivity Services) allows Interfacing to Data that does not Live in SharePoint. For example, we can connect to External Databases, OData Sources etc.

When to use BCS?

The ideal scenarios to use BCS are:

· To leverage an existing SQL Server Table containing Data. BCS would free us from duplicating the Table in SharePoint. BCS also saves the cost involved in Synchronizing Data if there are users working on updating the source table.

· In Internal SharePoint application requiring data from External application. In this case we can create Custom .Net BCS Providers.

BCS Example

In our example we are creating a BCS List pointing to SQL Server Table. Please follow the steps below to create the BCS List in SharePoint. After the List creation, you will be able to Add/Edit/Delete items in the List & everything will reflect back in the SQL Server Table.

Step 1

Create a new SQL Server table named Customer.
image

Use the following structure:

1. Id Integer Identity

2. Name Nvarchar (max)

3. Address Nvarchar (max)

Fill the Table with some data as shown below.
image

Step 2

Open SharePoint Designer 2013 & Go to External Content Types pane as shown below.

image

Choose the External Content Type button from the left pane for creating a New External Content Type. (External Content Type is the keyword for referring BCS Content Types)

Enter the Name for the Content Type and click the highlighted area below to configure External Data Source.

image

You will get the following dialog. Choose Add Connection option.

image

In the appearing dialog choose SQL Server.

image

Enter the Credentials to SQL Server.
image

Choose our table. Right click and choose Create All Operations.
image

You will get the following wizard.

image

Click Next with default values.

Step 3

Now we need to create the List Instance. Go to Lists and Libraries in Designer and click the External List ribbon item.

image

Choose our Content Type from the appearing dialog box.

image

Click OK to continue. Enter the name as Customers for the list. Now you have successfully created the List Instance of our External Content Type.

Step 4

Now we can Test our new List. Open SharePoint & You should be able to see the Customers list in the Quick Launch. Click on it to see the items below.

image

Once you can see the data like above – You have successfully configured BCS External Content Type.

Errors

It is not surprising that you may get the following errors. You can refer the associated links to resolve them.

Access denied by business data connectivity.

http://www.jeanpaulva.com/index.php/2016/01/23/bcs-error-access-denied-by-business-data-connectivity/

Login failed for user

http://www.jeanpaulva.com/index.php/2015/12/27/bcs-error-login-failed-for-user/

AuthenticationMode RevertToSelf

http://www.jeanpaulva.com/index.php/2015/10/18/bcs-error-authenticationmode-reverttoself/

References

https://technet.microsoft.com/en-us/library/ee661740.aspx

Summary

In this article we have explored how to configure BCS External Content Type in SharePoint 2013.

Advertisements

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

BCS Error – Access denied by Business Data Connectivity

Posted by Paul on January 23, 2016

You will get the following error while first time configuring BCS.

· Access denied by business data connectivity.

image

Solution

Following would be the solution.

Open Central Administration > Manage Service applications > Click Business Data Connectivity Service.

image

In the appearing page click on the Set Metadata Store Permissions ribbon item.

image

You will get the following page. Here do the following:

· Enter Everyone and click Add button

· Check all the permissions listed below

· Check the Propagate Permissions too

Click OK button.
image

Now retry your BCS List in SharePoint.

Summary

In this post we have explored a common error while configuring BCS & steps to resolve it.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

BCS Error – Login Failed for User

Posted by Paul on December 27, 2015

You will get the following error while first time configuring BCS.

Error

Message from External System: ‘Login failed for user ‘NT AUTHORITYANONYMOUS LOGON’.’.

image

Solution

Following would be the solution.

Open SharePoint Designer. Go to External Content Types > Open BCS item > Click Connection Properties button.
Choose the Authentication Mode as BDC Identity as shown below.

image

Save changes & Retry opening your BCS List.

Summary

In this post we have explored a common error while configuring BCS & steps to resolve it.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

BCS Error – AuthenticationMode RevertToSelf

Posted by Paul on October 18, 2015

In this post we can examine a common error while configuring BCS for SharePoint 2013.

Error

You will get the following error while first time configuring BCS.

image

Solution

Following would be the solution.

You need to update the property RevertToSelfAllowed at Service Application level.

image

You can use PowerShell to update this.

image

Run the following code.

$bcs = Get-SPServiceApplication -Name “Business Data Connectivity Service”

$bcs.RevertToSelfAllowed = $true;

$bcs.Update();

Now retry opening your BCS List. The error should disappear.

Summary

In this post we have explored a common error while configuring BCS & steps to resolve it.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

CRUD and BCS

Posted by Paul on September 30, 2012

In this article we can experiment with BCS by connecting to an external database. After completing this article you will be able to:

· View Database Table inside SharePoint

· Perform Add/Edit/Delete operations

Following are the activities involved.

1. Create database and table

2. Using SharePoint Designer create BCS External Content Type

3. Using SharePoint Designer create Add/Edit/Delete operations metadata

4. Using SharePoint Designer create Lists & Form

5. Using Central Administration set Permissions for external Content Type

1. Create database and table

Create a database and table named Customer with following fields:

clip_image002

Add some data into it:

clip_image004

2. Using SharePoint Designer create BCS External Content Type

Now we can create an External Content type using SharePoint Designer. Start the Designer application and open our SharePoint web site > External Content Types as shown below.

clip_image006

Click on the External Content Type button from the top side. In the appearing window change the Name and Display Name (click on the links) as shown below.

clip_image008

Now click on the External System link and you will get the following dialog.

clip_image010

Click on the Add Connection button and select SQL Server in the appearing dialog.

clip_image012

In the appearing connection details dialog, enter your server details.

clip_image014

Click the OK button and your server connection is ready.

3. Using SharePoint Designer create Add/Edit/Delete operations metadata

From the appearing tables list select the Customer table and right click to get the context menu. Use the Create All Operations menu item to get the Add/Edit/Delete operations wizard.

clip_image016

Click on the Finish button in the appearing wizard.

clip_image018

Click on the Save button from the top tool bar.

clip_image020

4. Using SharePoint Designer create Lists & Form

Now the operations are ready and we need to create the List Form and the associated Add/Edit/Delete forms inside SharePoint.

clip_image022

From the toolbar, click on the Create Lists & Form button as highlighted above. In the appearing dialog box enter the name for the List and click the OK button as shown below.

clip_image024

Wait for a while and your List page will be ready.

clip_image026

5. Using Central Administration set Permissions for external Content Type

Now you can try viewing the Customer Data list inside SharePoint.

clip_image028

On clicking the list, you will be seeing an “Access Denied by Business Data Connectivity” error message. To resolve this we need to set permission for the External Content Type.

Open the SharePoint Central Administration website. Click on Manage Service Applicatoins.

clip_image030

In the appearing page click on the Business Data Connectivity Services link as shown below:

clip_image032

In the appearing list, hover over the Customer Data item and click on the Set Permissions menu item as shown below.

clip_image034

You will get the following dialog.

clip_image036

Enter the user name, click the Add button and check all permissions. Click the OK button to close the wizard. (Make sure you are adding the username used to view SharePoint)

Now you are ready with the Permissions. Go back to the SharePoint > Customer Data list and you will be able to see the data as shown below.

 

Now you can try playing with the View/Edit/Delete features of the BCS list.

References

http://www.zimmergren.net/technical/access-denied-by-business-data-connectivity-solution

Summary

In this article we have seen how to create an External Content Type through Business Connectivity Services and view it inside SharePoint. In the real world scenario using BCS we can connect to WCF Services and other Business Applications like Microsoft CRM to view/update data inside SharePoint.

Posted in SharePoint | Tagged: , , , , , , , | 2 Comments »