Question

Versioning can be defined the same way in UI in SP2013 and O365:

versioning settings

How can we programmatically set these limits in SP2013 without server-side code?

Server-side we would have SPList.MajorVersionLimit and SPList.MajorWithMinorVersionsLimit but the members of client-side List do not contain these properties.

Was it helpful?

Solution

The Microsoft.SharePoint.Client.dll with version 15.0.4665.1000 and above provide the MajorVersionLimit-property. If you can upgrade to the latest CU you should be doing fine.

OTHER TIPS

You can't do this using CSOM. This is a limitation of CSOM. However, if you can use templates to create document libraries or lists then you can do it in the template itself. Use CSOM to create document libraries or lists using the pre-defined templates where version settings are pre-configured.

Stumbled the same issue. No solution yet.

I posted it as a feedback at OfficeDev UserVoice, hope it will be fixed soon or later - MajorVersionLimit & MajorWithMinorVersionsLimit props for List in CSOM/REST

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top