1

I need to set all list versioning properties via csom. all list versioning settings

All properties I usually set with following code:

SP.List l = new SP.List(...);

l.EnableModeration = true;              //1
l.EnableVersioning = true;              //3    
l.EnableMinorVersions = true;           //4


l.MajorVersionLimit = 1;                //6
l.MajorWithMinorVersionsLimit = 1;      //8

l.DraftVersionVisibility                //9
    = SP.DraftVisibilityType.Approver;
l.ForceCheckout = true;                 //10

//saving

I suppose that '5', '7' can be set like this: (I mean with '0' value)

SP.List l = new SP.List(...);

l.MajorVersionLimit = 0;                //5
l.MajorWithMinorVersionsLimit = 0;      //7

And '2' like this:

SP.List l = new SP.List(...);
l.EnableModeration = false;             //1

(according to the picture) And btw where these properties are stored in WSS_Content ? Some of them could be taken from AllLists:

SELECT *
  tp_MaxMajorVersionCount,
  tp_MaxMajorwithMinorVersionCount,
  tp_ModerationStatus,

  --contain such properties as: FORCECHECKOUT, MINORVERSIONENABLED, MINORAUTHOR, 
  --MINORAPPROVER, ALLOWEVERYONEVIEWITEMS
  tp_Flags
FROM
  [dbo].[AllLists]

Your Answer

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

Browse other questions tagged or ask your own question.