Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an external content type that I'm accessing through a .NET assembly. So I created a BDC model with Type="DotNetAssembly" (for now with just finder and specific finder operations).

It works, but I can't for the life of me figure out how to display some friendly column names.

For example, I have this type descriptor for the entity:

<TypeDescriptor Name="CustomerID" TypeName="System.String" />

What gets displayed in my list view is "CustomerID". I wanted to be "Customer identification" so switched to this:

<TypeDescriptor Name="CustomerID" TypeName="System.String" DefaultDisplayName="Customer identification" />

No joy!

I even created a View for the external list using the external content type and set this in it:

<FieldRef Name="CustomerID" DisplayName="Customer identification" />

Still no joy!

So my question is, how do I display a friendly name for the external columns?

share|improve this question
    
Just ran into this too :( –  leppie Jul 16 '12 at 8:08

1 Answer 1

The solution is using BCS resources. How to create and import BCS resources: 1) create a file with .bdcr extension 2) add content there like

<Model xmlns="http://schemas.microsoft.com/windows/2007/BusinessDataCatalog/Resources"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       Name="...">
  <LobSystems>
    <LobSystem Name="...">
      <LobSystemInstances>
        <LobSystemInstance Name="..." />
      </LobSystemInstances>
      <Entities>
        <Entity Namespace="..." Version="1.0.0.0" Name="...">
          <LocalizedDisplayNames>
            <LocalizedDisplayName LCID="1033">...</LocalizedDisplayName>
            <LocalizedDisplayName LCID="1049">...</LocalizedDisplayName>
          </LocalizedDisplayNames>
          <Identifiers>
            <Identifier Name="Id" />
          </Identifiers>
          <Methods>
            <Method Name="ReadList">
              <Parameters>
                <Parameter Name="returnParameter">
                  <TypeDescriptor Name="...">
                    <LocalizedDisplayNames>
                      <LocalizedDisplayName LCID="1033">...</LocalizedDisplayName>
                      <LocalizedDisplayName LCID="1049">...</LocalizedDisplayName>
                    </LocalizedDisplayNames>
                    <TypeDescriptors>
                      <TypeDescriptor Name="...">
                        <LocalizedDisplayNames>

3) the link will be useful for you to understand the schema of the resource files 4) pay attention to versions in the bcs model and the resources files 5) IMPORT the resources in the central admin 6) Newly created external lists should be localized

Note: you can set up the localization in the model itself if you do not want to create an extra file.

share|improve this answer
    
I'll give this a try next chance I have. Until then +1 to you. Thanks. –  JohnDoDo Aug 22 '12 at 9:22

Your Answer

 
discard

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.