- Sunday May 19,2013 12:31 AM
- By admin
- In twitter
il blog di Marco Trova
We recently upgraded our company to Office365 from Google Apps (more details in another post). Our colleagues from Marketing Department never used SharePoint in real production so I received an interesting question: “Toni, how do I lock a document so no one can change it while I do?”
The answer is, you need to perform check out. Here is how you can do this in SharePoint 2013:
One annoying thing about CSOM in SharePoint 2010 is that there is no way to add persisted items to Web.AllProperties or Folder.Properties. This deficiency is fixed in 2013 but the way it works is not obvious because if you look at the objects (and you are me) you'd guess that the way to set a property is to manipulate the PropertyValues.FieldValues collection and you'd be wrong!
Here is a working example in C#.
var props = clientContext.Web.AllProperties;
props["propertyName"] = "Value";
Author: Doug Ware