Month: January 2012

BCS (2) Creating an External List from an ECT

Hi ūüôā

In the previous blog post ‚Äst¬†‚Äď we created the ECT. Now, we are going to utilize the ECT within the new feature of SharePoint 2010 known as an External List. After we‚Äôve created and viewed our External List, we are going to use the data offline.

So lets Get Started ūüėČ

There are 2 ways to create an external list either via SP designer or via the SP site:

  1. Creating an  External List from SP Designer:
if you have done the first post the you already have you external content type Contacts if not the open SP designer and Click ‚ÄúExternal Content Types‚ÄĚ in the Site Objects Navigation. and select your content type

On the ribbon, click the Create List and Formsbutton and  enter AWContacts in the List Name field, uncheck the Create InfoPath Form and click the OK button.

Wait till the list is created and then Close SharePoint Designer.

           2. Creating an External List from the site:

i will show you another way to create a external List? If you’re not interested you can skip this part ! no problem.

First of all open your site in the browser, then in click Site Actions => More options

then click on Filtered by List and choose external List and Finally Create:

now fill in the blanks ūüėČ

and it’s done.

           3. Configuring the security settings:

Open the browser and navigate to the site collection. You‚Äôll see the previously created list, click on it and you may get the error ‚ÄúAccess denied by Business Data Connectivity‚ÄĚ

so  we must configure the security settings on the new BCS application we just created:

a.       Open SharePoint 2010 Central Administration

b.      In the Application Management section select Manage service applications

c.       Underneath the Name column click on the Business Data Connectivity Service hyperlink

d.      On the Service Application Information screen, expand the Contact application’s dropdown arrow and select Set Permissions

On the Set Object Permissions dialog box type All Authenticated Users into the first text box and click Add.

then check at least execute:

Try to open the list on the site collection and refresh if needed.

and Voila !!!!! ūüôā

           4. Using the Data offline:

Launch SharePoint Workspace 2010. You may have to set up an account when you first start the application. (use your User information pulled from Active Directory)

after launching the SP Workspace return to the list in SharePoint and click the List tab on the ribbon.

Click the Sync to SharePoint Workspace button to open the list in the SharePoint Workspace. (this will take a while.)

When the process finishes, click the Open Workspace button to close the wizard.

and We’re Done !!

So, in this post i created an external content type, the associated forms and even sync’d the list with SharePoint Workspace 2010 for offline use.


Business Connectivity Services (BCS) ‚Äď Creating an External Content Type based on a SQL 2008 Table with Sharepoint Designer

Hello again ūüėČ

i am going to talk about a very common scenario: I have a portal, I have some external data, and I want to integrate that data into my portal in a meaningful way.

Business Connectivity Services (BCS) in SharePoint 2010 is all about connecting to external data.  it’s easy to create an external content type with SharePoint Designer, create an external list in SharePoint’s Web user interface and take the list offline into Outlook as a set of contacts. Also, you can make updates to contacts in Outlook that will cause the data in the external system to update as well.

Today i am going to show you how to do it !!!!

In this scenario, this is what we’ll be using:

  • a SharePoint 2010 platform of course ūüôā
  • a database. You can use Microsoft‚Äôs sample database ‚ÄúAdventureWorks‚ÄĚ. You can download them here:¬†‚Äď I‚Äôll use the database ‚ÄúAdventureWorks2008R2‚ÄĚ.
  • a Site Collection. (i am going to use the one i created in the previous post and you can use the one created by default in SD if you want).

So let Get Started !!! ūüėČ

First of all you need to Install the AdventureWorks Database. here is an MSDN link to walk you through it , otherwise you can create your own database and work with it.

       1.Create External Content Type in SharePoint Designer 2010:

let’s start by ¬†opening SharePoint Designer 2010 (‚ÄúSPD‚ÄĚ),¬†click Open Site and enter the address to the site for example¬†

After the site opens in, click External Content Types in the left-hand pane. Give SPD a moment to build the list of existing entities, which should be empty at this point.

click the External Content Type button in the New group on the External Content Types tab on the ribbon.

2.Name the External Content Type

In the New External Content Type tab, enter Contact in the Name and Display Name fields.

Enter AdventureWorks in the Namespace field. and then select Contact in the Office Item Type drop-down list. Your entity should look like this:

     3. Discover Your External Data Source

now¬†¬†Click ‚ÄúAdd Connection‚ÄĚ

Select ‚ÄúSQL Server‚ÄĚ in the drop down ‚ÄúData Source Type‚ÄĚ in the dialog.

On the next dialog enter the Database Server Name, Database Name and the Name of the new connection. Select ‚ÄúConnect with User‚Äôs Identity‚ÄĚ.

In the SQL Server Connection dialog, use the following and click OK:

a.       SQL Server: ******

b.      Database Name: AdventureWorks

c.       Name (optional): AWConnection

d.      Choose Connect with User’s Identity

your database server name may be .\sqlexpress or the name of the sql server instance that you’re using.

now expand the Connection node and the Tables folder and select the Contact table. (if you are using AdventureWorks).

4.Define Your Operations

Right click the table, and select Create All Operations from the context menu.

This options creates the well-known CRUD operations.

click the Next button.

In the Parameters Configuration dialog, do the following and then click Next:

a.       Select the LastName field from the list of Columns.

b.      In the Office Property drop-down list, select LastName.

c.       Check the Show In Picker checkbox.

d.      Click the Next button.

Click the Finish button to close the wizard.

Again, SPD 2010 will do its thing, and when it finishes, you will see a report of the operations that were successfully.


This leads us straight into the next blog, which will discuss what you do with an ECT once it’s created:

How to install and Configure Sharepoint Server 2010

In this post i am going to show you  how to install and configure Microsoft SharePoint Server 2010 and how to create your first Site Collection.

So let’s Get Started ūüėČ

As you certainly know, SharePoint 2010 requires a 64 bits OS to run.

For this example, I will use Windows 2008 R2 Standard edition. You can download a trial from Once on that site, click the button and enter your registration information to gain access to the download. Of course, if you already have a Windows ISO or DVD handy, you can use it.

As for Sharepoint i will be using the Enterprise edition. You can go to and follow the link to register for the 180-day trial version.

  1. extracting the EXE.
Double click the installation package to launch the installation of  Microsoft SharePoint Server 2010.
 then you will get The SharePoint 2010 installation Wizard
The SharePoint 2010 installation Wizard
           2. Installing the SharePoint Prerequisites
 under Install > click Install Software prerequisites…
Below are the items that will be installed as prerequsites for SharePoint 2010, if any of these fail, you MUST correct it before moving forward even though the installation may allow you to continue.
Click next then accept the licence agreement.
now you have installed the SharePoint Prerequisites successfully.
        3. Installing the SharePoint Server:
Back to the SharePoint 2010 Installation wizard, click the “Install SharePoint Server” link. The launched wizard requires the product key.
Provide one if you have it or simply use the trail key offered by Microsoft, and click continue.
Then, accept the terms of the licence agreement.
Personally, i ¬†always choose Server Farm, because I want the extensibility ¬†to add Servers and Roles Later on. So in this Instance I choose ‚ÄúServer Farm‚ÄĚ and continue. But if you are¬†¬†in your ¬†lab environment and this is your first time installing Sharepoint you ca choose¬†‚ÄúStandalone‚ÄĚ.
you can choose complete if you want to add more servers later on or you can simply choose Stand alone if you’re planning on using SQL server express edition
click install now.
Once the installation is complete, the Configuration of the Farm Begins once you click close and the check box is enabled.
          4. configuring the Farm:
When the installation of the SharePoint files is finished you are asked to continue with the SharePoint Products Configuration Wizard.
As part of the configuration, a few services have to be stopped and restarted.
Step 2 on Configuration wizard click ‚ÄúYes‚ÄĚ to start IIS and¬†SharePoint¬†Admin, Timer service.
If you chose “standalone” the the configuration is over as far as you’re concerned. if not then you have to either create a new farm(If this is the first server) or choose to connect to an existing farm.
click next.
we are almost done we only have 2 steps to go.

Fill out the screen as shown in Figure below. For ‚ÄúDatabase server,‚ÄĚ this is the name of the
local VM you chose earlier. For ‚ÄúDatabase name,‚ÄĚ I always recommend the default for the
sake of simplicity. ‚ÄúUsername‚ÄĚ is the sp_farm account created earlier. The account is just a
regular domain user that SharePoint will elevate permissions for as necessary. This account
will be one of the most important accounts in your farm. The Central Administration application
pool and the SharePoint timer service will both use this account. Also, it will be the
database owner (DBO) of all of your SharePoint databases. Click Next.

Enter a farm passphrase and confirm it. The passphrase you use here must be complex, and
you must remember it. Click Next.

Here you will get a random port number to begin withs. and here is where you will choose NTLM or Kerberos as your authentication provider.

click next and it is over

After about 4 minutes, you get the Configuration Successful screen. Hooray!¬†click finish and Voila ūüôā you are about to finally create your first site collection.

5. creating a web app:

When you click “Finish” to close the wizard, the Central Administration Site is opening, and you are prompted for credentials.

Another page let you choose between configuring your farm yourself or by using a wizard.

When this choice is made, you display for the first time the brand new Welcome Page of SharePoint 2010 Central Administration.

now in the first section the Application Management section, click the Manage web applications link.

On the “Manage Web Application” page click the “New” menu entry then click “New Web Application”:

In the Create New Web Application dialog, select Create A New IIS Web Site and type SP2010Dev in the Name field. Accept the defaults for all other settings, and then click OK at the bottom of the page to create the web application.

After the new web application has been created, a dialog confirming success appears, as shown. Click OK to close the dialog.

You can go to IIS to see the new IIS Web site.

6.Creating a Site Collection:

The next step in the site provisioning hierarchy is the site collection

From the Central Administration Home Page, click on “Create site collections” in order to proceed to the creation of your first SharePoint 2010 Site Collection.

In the Web Application drop-down, ensure that the SP2010Dev web application is selected. (This will appear as http://<servername&gt;:<portNumber>.)Then  type SharePoint 2010 Demo as the title, and then select Blank Site as the site template. Add an appropriate username in the Primary Site Collection Administrator box. Generally, this will be the username you use to log in to the server that
provides full administrative privileges on all sites within the site collection.
Finally Click OK to complete the process. A confirmation message will be displayed when
the process has completed. Take note of the URL that is displayed for our new site
collection, because you’ll need it later on.

Although we’ve set out to create a site collection, we’ve also selected a site template and named our web site. Each site collection must have at least one root site.

To achieve this, select the Select Template Later option in the Custom tab of the Template
Selection section, as shown in figure above

7.Creating a Site:

Connect to the URL of the site collection that we created earlier.

In the upper-left corner of the page, click the Site Actions menu, and then select New Site:

The Create dialog displays a number of different templates from which we can choose when creating our new site. For the purposes of our demonstration, select Team Site and type the Title as Team Site and the URL as TeamSite, as shown:

Click the Create button to provision the new site.

When clicking on this site link, you can display your first SharePoint 2010 site.

Our new site is created as a child of our site collection root site. We can add more child sites to our team site, allowing us to build a hierarchy of sites all contained within the same site collection. Next to the Site Actions button is a folder icon, and by clicking this we can view a navigation control that shows where we are within our site collection:

Well Done !! ūüôā