1

I'm using the following code:

ClientContext ctx = new ClientContext("SiteUrl");
List lst = ctx.Web.Lists.GetByTitle("DocumentLibraryname");

CamlQuery cq = CamlQuery.CreateAllItemsQuery();

ListItemCollection lic = lst.GetItems(cq);

ctx.Load(lic, items => items.IncludeWithDefaultProperties(
        item => item.DisplayName,
        item => item["Description"]));

ctx.ExecuteQuery();

foreach (ListItem l in lic)
{
    Console.WriteLine("title: {0}, DisplayName: {1}, Modified: {2}, Description: {3}", 
                        l["Title"], l.DisplayName, l["Modified"], l["Description"]);
}

If I were to remove the "item => item["Description"], and l["Description"] the rest of the results would be returned. What is special about the Description field in a SharePoint document library? How can I return the contents of a Description field?

Thanks in advance.

Scott Smith
  • 1,823
  • 17
  • 15
rross
  • 2,236
  • 11
  • 36
  • 41

1 Answers1

2

SharePoint has two types of names for columns, the internal names and the display names. "Description" is more likely the "Comment" internal field.

http://salaudeen.blogspot.com/2011/06/sharepoint-columnfield-display-names-vs.html

Here's a list of SharePoint 2010 internal field names, as well.

http://aarebrot.net/blog/2010/06/frodes-awesome-list-of-sharepoint-column-field-ids-for-sharepoint-2010/

mellowgeek
  • 305
  • 1
  • 7