3

is there a way to add and retrieve values from the property bag of a list item using CSOM? I am using sharepoint 2013, all my searches come up empty for the list item, and I know in sharepoint 2010 it was not posible.

I would very much like to know if it can be done and how.

Thanks in advance.

2

I think that it's not possible. ListItem class doesn't expose any property or method to operate on property bag.

| improve this answer | |
1

Get Property

var lst= ctx.Web.Lists.GetByTitle(listTitle);
ctx.Load(lst, l => l.RootFolder.Properties);
ctx.ExecuteQuery();
var value = lst.RootFolder.Properties[key];

Set Property

var list = ctx.Web.Lists.GetByTitle(listTitle);
var lstProps= list.RootFolder.Properties;
lstProps[key] = value;
lst.RootFolder.Update();
ctx.ExecuteQuery();
| improve this answer | |
  • That is for list property, I am looking for list item property bag – jvr Feb 23 '17 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.