in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

How to: Create a BCS Profile Page in SharePoint 2010

I was working on updating my Search demo for #spshou and my BCS search results were really ugly.  I didn’t have a default action specified on my search results, nor did I have a profile page, so instead the search results would give me the BDC protocol URL which is not usable by an end user. 

BCSSearchResults

In MOSS 2007, if you did not create a default action, it would automatically create a profile page for you.  In SharePoint 2010, this is not the case.  It’s pretty easy but there are a few steps involved.

Start by opening SharePoint Designer and open your external content type in question.  In the top right, you will find the Create Profile Page button. 

BCSSharePointDesignerNewProfilePageButton

Give it a click.  However, if you haven’t configured a profile host URL, you will get the following error.  Chances are you haven’t configured one of these yet.

BCSSharePointDesignerProfilePageError

Unable to provision profile page because the profile host URL was not specified.

After doing a search, I found only one usable result on the Internet on MSDN forums.  It had the answer, but it wasn’t clear to me at first.  It said to use the Configure button in the ribbon.  However, I was looking in SPD, and in fact its in the Service Application instead as you can see below.

BCSServiceApplicationConfigureButton

Select the application you want to edit and then you can click Configure.  This brings up the popup shown below which prompts you for a URL of the site that to keep you profile pages in.  I like this since you can configure these at a per application definition level now instead of one location for every entity on the SSP.

BCSConfigureProfileSite

I decided that I wanted my profile pages in a specific subsite, so I went ahead and created a new one.

BCSProfileNewProfileSite

After I finished configuring my site and setting up the Profile Page Host, I was able to go back to SPD and click the button.  This pops up a progress bar, but it doesn’t really give you any visual indication that anything is done.  I then went back to my content sources and recrawled my BCS content source.  When it finished, I executed a new search, and now I get actual usable URLs in my search results.

BCSSearchResultsProfilePage

As you can see it generated kind of a long URL with _bdc in it.  I believe the http and sp2010 come from the namespace specified in SharePoint Designer.  Finally it names a page after the entity itself.  So far, I’m not sure if any of the page name stuff is configurable or not, so I need to look into that.  Once you click on the page, you get a simple profile page to display the results.

BCSProfilePageComplete

It’s simple, but it has all the pertinent information from the underlying database table.  It beats what I had before.  I think a custom default action can be specified just like in MOSS 2007, but I get the feeling you have to edit the application definition XML manually to make it happen.  I’m still looking into it.  Anyhow, I hope this helps, the next time you try to use the BCS.

Comments

 

Nils said:

Oh my god - I just spent a few hours trying to find this solution! - The german translation of the error speaks of a hostwebsite (ridiculously the error message is in english)

Thank you very much for finally giving me this :)

June 10, 2010 10:23 AM
 

Pogo said:

Hello,

I have no Search Service on my site...

How can I access to my _bdc Folder?

How the Profile Page's URL is it built?

Thanks.

September 3, 2010 4:09 AM
 

CoreyRoth said:

@Pogo The profile page URL is built once you configure the URL on your service application.  The _bdc folder is autogenerated once you create a profile page.

September 7, 2010 12:17 PM
 

Brent said:

Does anyone have steps to perform this via powershell?

September 8, 2010 1:32 PM
 

Brent said:

Please find details on the PS steps to create the profile page.

Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

# Create the profile page

$url = "http://gr06"

$context = Get-SPSite $url | Get-SPServiceContext

# Do not use these commented out constructors. There is currently a bug in the BdcServiceApplicationProxy contstructor where the AppId is not set.

# Therefore, the ProfileProvisioner constructor doesn't get called with a valid bdcproxy object. It's not obvious that there was a problem until the CreateProfilePage call.

# At which point there is an error message: Exception calling "CreateProfilePage" with "2" argument(s): "Object reference not set to an instance of an object."

#$bdcproxy = New-Object Microsoft.sharePoint.BusinessData.SharedService.BdcServiceApplicationProxy

#$profileProvisioner = New-Object Microsoft.SharePoint.Portal.WebControls.ProfileProvisioner($bdcproxy, $MetadataStore)

$profileProvisioner = New-Object Microsoft.SharePoint.Portal.WebControls.ProfileProvisioner($context)

$res = $profileProvisioner.CreateProfilePage("Microsoft.Lobi.OracleModel","employee")

September 27, 2010 1:50 PM
 

aaron witt said:

so, i've created the standard display/edit/new forms on an external content type list.  i've also created a profile page as a default action on the ect in question.  i am trying to accomplish two things with this setup:

1.) have the default link from the readlist be to the profile page, rather than the display form - i do not want to use the display form at all. i'd like all content type interactions to occur from the profile page, as it displays all pertinent data (i.e. associations, attributes, etc.)

2.) from the profile page, have two links for both editing the current content type instance and a link for creating a new instance of the content type in question.  i want the two links i just described to use the standard edit/new forms already created for the ect list.

how can i accomplish either one of these goals?  i'm finding that editing default webparts (specifically the readlist) is quite difficult and not at all straightforward.  any help would be greatly appreciated on this.  thanks.

October 20, 2010 4:20 PM
 

Josep said:

Does anyone tried to change the profile page url? Does it work?

For example, instead of having:

dsglespbr-s4019/.../Articles_DEV_2.aspx{0}

change it for:

dsglespbr-s4019/.../Articles.aspx{0}

June 16, 2011 6:01 AM
 

CoreyRoth said:

@Josep I think that should work.

June 20, 2011 4:11 PM
 

Chintu said:

In my project, Profile Page is enabled for search and search result page gives the list items with ...\profilepage url. Now client does not want search to be displayed in profilepage, instead wants these search URLs to point to EditForm web part. I have used custom web part developed in silverlight for Edit.

How can I do this in 2010?

September 13, 2011 2:34 AM
 

CoreyRoth said:

@Chintu go to your BCS service application, edit the bcs connection and you will be able to create a custom action.  Create a new action with a URL that points to your Silverlight edit page.  Make sure it is the default action and then recrawl.

September 15, 2011 5:23 PM
 

Alex said:

Thanks much for the article - made my day after multiple hours of trying figuring it out

October 25, 2011 8:38 AM
 

sireesha said:

Hi Corey,

I am using sharepoint 2010 Business connectivity service. I need to search an item in the database. So I configured search service. I am able to find the search results but when I clicked on the results , the URL starts from bdc3:// instead of going to profile page. The error showed on the page is "web page cannot be displayed". Please guide me to resolve this problem.

Appreciate your help.

November 15, 2011 8:15 AM
 

CoreyRoth said:

@sireesha If you can search the data, you may just need to reindex after you have created the profile page.  If it works correctly, you will see the profile page URL in the crawl logs.

December 7, 2011 8:40 PM
 

BCS Create Profile Page « Sladescross's Blog said:

Pingback from  BCS Create Profile Page « Sladescross's Blog

January 24, 2012 10:51 AM
 

BCS Create Profile Page « Sladescross's Blog said:

Pingback from  BCS Create Profile Page « Sladescross's Blog

January 24, 2012 10:51 AM
 

mhu said:

"Finally it names a page after the entity itself.  So far, I’m not sure if any of the page name stuff is configurable or not, so I need to look into that"

Have you been able to look into this?

I use search.asmx for searching, and the returned Title, Path and Filename properties all point to the Products_1.aspx page instead of the fields from the BDC datasource.

November 27, 2012 9:05 AM
 

Henning said:

The page name displayed in the search results is indeed configurable from SharePoint Designer. Open your external content type, click any one of your fields that you would like to be set as the search title and click 'Set as Title' in ribbon. Bingo!

October 16, 2013 3:39 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems