Friday, April 25, 2014

Coding: Loading SharePoint Objects (C# SharePoint)

This was not the behavior I was expecting, so here is a reminder to myself. When loading objects from SharePoint using the SP Client, I must load the object and still execute query.

            clientContext.Load(object);
            clientContext.ExecuteQuery();

object can be fields, lists, item, etc.

Another unexpected behavior is that dictionary's KeyCollection does not use an indexer, so enumerators have to be used to iterate through the collection.

No comments:

Post a Comment