Skip to main content
edited tags
Link
Alex Angas
  • 6k
  • 9
  • 50
  • 89

I was querying a sharepointSharePoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field (http://msdn.microsoft.com/en-us/library/ms439470.aspxare listed as a built in field). HowHow do I know what is supported and what isn't? It'sIt's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }

I was querying a sharepoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field (http://msdn.microsoft.com/en-us/library/ms439470.aspx). How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }

I was querying a SharePoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field. How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }

I was querying a sharepoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field (http://msdn.microsoft.com/en-us/library/ms439470.aspx). How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }

I was querying a sharepoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field (http://msdn.microsoft.com/en-us/library/ms439470.aspx). How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }

I was querying a sharepoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field (http://msdn.microsoft.com/en-us/library/ms439470.aspx). How do I know what is supported and what isn't? It's a runtime error that I'd like to avoid.

    private static void ListDocuments(ClientContext clientContext)
    {
        List list = clientContext.Web.Lists.GetByTitle("My Documents");

        CamlQuery camlQuery = new CamlQuery();
        camlQuery.ViewXml =
            @"<View>
            <Query/>
            <RowLimit>100</RowLimit>
          </View>";
        ListItemCollection listItems = list.GetItems(camlQuery);
        clientContext.Load(
             listItems,
             items => items
                 .Include(
                   // how do I know what is legal here?
                   item => item["LinkFilename"],
                     item => item["FileRef"],
                     item => item["File_x0020_Size"],
                     item => item["File_x0020_Type"],
                     item => item["Modified"]
                     ));
     }
Tweeted twitter.com/#!/StackSharePoint/status/61596727198756864
Source Link
MedicineMan
  • 329
  • 1
  • 2
  • 10
Loading