I have started development in Visual Studio.
I need help on how to programatically set Advanced permissions for a SharePoint list, specifically the "Create items and edit items that were created by the user" setting
Try it as below:
var customList = web.GetListByTitle("Documenten");
// Change the advanced settings
//1— All users have Read access to all items.
//2— Users have Read access only to items that they create.
customList.ReadSecurity = 2;
//1— Write all items.
//2— Write only my items.
//4— Write no items (read-only list).
customList.WriteSecurity = 2;
customList.Update()
context.Load(customList);
context.ExecuteQuery();
Ensure that you have the latest version of CSOM or atleast August 2016 CSOM dll.
SharePoint CSOM version released for SharePoint Online - August 2016