Create External Content Type Based on Stored Procedure in SharePoint 2013 BCS

create external content type sharepoint 2013 1.png
InfoPath alternatives for form designing SharePoint

 I have a requirement wherein I will be using External Content Type (BCS) using a Stored Procedure.
– The stored procedure has parameters.
– I have to set up Read List and Read Item operations.

Objective:
The objective of this exercise is to write a Stored Procedure that returns a list of SharePoint History from the SharePoint Test database and displays these results by using the Business Data List web part. We will also see how we can use various filters (ID for our example) to limit the result set returned by the stored procedure.

Read some SharePoint branding articles below:

Steps:
Create External Content Type

In this step, we will use SharePoint Designer to create an External Content Type from the stored procedure created in the previous step.



1. Browse to the “SharePoint – 80? site in your development environment.

2. On the Site Actions drop-down, click Edit in SharePoint Designer.

3. In the Navigation pane, click External Content Types.

4. In the New group of the ribbon, click External Content Type.

5. In the External Content Type Information group, edit each of the parameters as below and leave the remaining to their default settings.

Property Value
Name SharePoint History
Display Name SharePoint History
Namespace SharePointTest
Version 1.0.0.0

7. Next to External System, click Click here to discover external data sources and…

sharepoint 2013 external content type
sharepoint 2013 external content type

8. In the Data Source explorer, expand the SharePoint Test to find the stored procedure sp_Sharepoint_History under the Routines node.


create external content type sharepoint 2013
create external content type sharepoint 2013

9. Right click on sp_Sharepoint_History to open a pop-up menu and click New Read List Operation.

10. Click the Next > button at the bottom of the Read List dialog.

11. On the Input Parameters page, click @ID in the Data Source Elements pane.

12. In the Properties pane, edit the values as below. Then, click Click to Add against the Filter property.

sharepoint 2013 external content type
sharepoint 2013 external content type

13. In the Filter Configuration dialog, select New Filter. Edit the properties as below leaving the rest to their default. Then click OK.

Property Value
New Filter ID
Filter Type Comparison
Operation Equals

14. 

sharepoint 2013 external content type tutorial
sharepoint 2013 external content type tutorial

15. Click the Next> button at the bottom of the Read List dialog.

16. On the Return Parameters page, click ID in the Data Source Elements pane.

17. In the Properties pane, check the box for Map to Identifier and Show In Picker.

external content type sharepoint 2013 step by step
external content type sharepoint 2013 step by step
  1. Click the Finish button.

19. Click the Save button in the Quick Access Toolbar to commit the changes.

20. Navigate to your SharePoint 2013 site.

21. From this page select the Site Actions | Edit Page.

22. Click on Add a Web Part, in the left web part zone.

23. From the web parts selection menu, select Business Data in the Categories section and then from the list of web parts select Business Data List and click add.



external content type sharepoint online
external content type sharepoint online

24. From the web part’s action menu, click on Edit Web Part to open the tool pane for this web part.

25. In the Business Data List section of the edit pane, click on the picker icon next to Type field to bring up the External Content Type Picker dialog form.

bcs sharepoint online
bcs sharepoint online

26. In the dialog form, select the content type created in the previous steps and click OK.

external content type sharepoint online
external content type sharepoint online

27. For the View Property, select Default (SharePoint History Read List) in the drop down.

external content types are not available sharepoint 2013
external content types are not available sharepoint 2013

28. Then click OK in the web part’s tool pane.

Final O/P:

business connectivity services sharepoint 2013 step by step
business connectivity services sharepoint 2013 step by step

Now we have seen how to configure the External Content Type and Business data List Web Part to make BCS looks like SharePoint List. Hope you enjoyed my article.

Similar SharePoint 2013 Tutorials


About Sagar Pardeshi

I am Developer working on Microsoft Technologies for the past 6+years. I am very much passionate about programming and my core skills are SharePoint, ASP.NET & C#,Jquery,Javascript,REST. I am running this blog to share my experience & learning with the community I am an MCP, MCTS .NET & Sharepoint 2010, MCPD Sharepoint 2010, and MCSD HTML 5,Sharepoint 2013 Core Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.

View all posts by Sagar Pardeshi →

Leave a Reply