SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a pretty simple BCS model:

public Guid Id { get; set; }
public SPFieldUrlValue Url { get; set; }
public string Description { get; set; }
public string Owner { get; set; }
public DateTime CreatedOn { get; set; }

The Url property contains both the Title and URL like any SharePoint Hyperlink property. The BCS model has the following Type Descriptor for both the ReadList and ReadItem methods:

<TypeDescriptor Name="Url" TypeName="Microsoft.SharePoint.SPFieldUrlValue">
        <Property Name="SPCustomFieldType" Type="System.String">`URL</Property>

In the list definition's schema.xml I have the following values for the Fields collection:

<Field Name="BdcIdentity" DisplayName="BDC Identity" Hidden="FALSE" SourceID="" StaticName="BdcIdentity" Type="Text" />
<Field Name="Id" DisplayName="Id" Hidden="FALSE" SourceID="" StaticName="Id" Type="Text" />
<Field Name="Url" DisplayName="Url" Format="Hyperlink" Hidden="FALSE" SourceID="" StaticName="Url" Type="URL" />
<Field Name="Description" DisplayName="Description" Hidden="FALSE" SourceID="" StaticName="Description" Type="Text" />
<Field Name="Owner" DisplayName="Owner" Hidden="FALSE" SourceID="" StaticName="Owner" Type="Text" />
<Field Name="CreatedOn" DisplayName="Created On" Hidden="FALSE" SourceID="" StaticName="CreatedOn" Type="DateTime" />

Nothing too fancy. When I open up the default view, however, it does not display the URL properly in the table view - it displays nothing. In the individual item view it does display properly. Any thoughts on how to get an SPFielidUrlValue to render properly on the UI?

share|improve this question
PSS has confirmed that this is a bug - waiting on resolution. – Colin Bowern Jan 9 '11 at 20:27
Design change request to fix the bug was rejected by the product group (shakes fist at SharePoint); PSS is now looking into alternatives. – Colin Bowern Jan 13 '11 at 21:51
up vote 1 down vote accepted

After two and a half months (!!!!) PSS was able to come up with a workaround using a custom XML stylesheet that gets stored in Layouts/Xsl:

<xsl:stylesheet xmlns:x="" xmlns:d="" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="" xmlns:asp="" xmlns:__designer="" xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
  <xsl:template match="FieldRef[@Name='Url' and @Format='Hyperlink']" mode="URL_body" priority="1">
    <xsl:param name="thisNode" select="."/>
    <xsl:variable name="url" select="normalize-space(substring-before($thisNode/@*[name()=current()/@Name],','))" />
    <xsl:variable name="desc" select="normalize-space(substring-after($thisNode/@*[name()=current()/@Name],','))" />
    <xsl:variable name="descfld" select="$thisNode/@Description"/>
    <xsl:variable name="urlfld" select="$thisNode/@Url"/>
    <!--  URL: <xsl:value-of select="$urlfld" /><br/>
          Description: <xsl:value-of select="$descfld" /><br/>
      Link: -->
    <a href="{$url}" alt="{$desc}">
      <xsl:value-of select="$desc"/>
share|improve this answer
Colin, Sorry for interupting u... But i can't figure out a way to do this... Pasting this code in the main.xsl works fine! But when i put this code in myFile.xsl it doesnt pick up my code... Are you 100% sure you didn't add any connection to this new file at all? Thanks – Frederik Prijck Mar 30 '11 at 15:10
Well, u can set XslLink in your XsltListViewWebPart or XsltListFormWebPart which are used for display list of item of BSC entity. Just open needed pages with SharePoint Designer and customize xslt. We've used this way and everything work good. – avishnyakov Aug 26 '11 at 8:24
@FrederikPrijck name it fldtypes_somename.xsl and it will get picked up automatically. – Bart Nov 16 '11 at 11:49

According to the MSDN page BDC Custom Properties:

This property has no effect on methods other than the SpecificFinder.

share|improve this answer

I am wondering, how can i implement this xsl? Offcourse i can create it, and deploy it into layouts/xsl... But there is no connection between the external list and the xsl file ?

share|improve this answer
All I did was deploy it to /_layouts/xsl and it picked up my field named "Url". – Colin Bowern Mar 25 '11 at 11:55
So you just create a file named "myxsl.xsl" and u just paste it in that folder ? Without refering to it somewhere ? And that file only contained the code you are mentioning ? (so nothing else that is described in main.xsl or so) – Frederik Prijck Mar 25 '11 at 12:38
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. – Stuart Pegg Aug 22 '12 at 11:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.