We have a custom class that extends PageData.
We are currently saving the data using IContentRepository.
How can we set the saved version as Common Draft?
Also, is Common Draft the same as Primary Draft? Documentation is not clear on that.
You can find more pieces of information on the below links-
Set Saved version as Common Draft as following:
writablePage.Name = "a new name";
var saveAction = SaveAction.CheckIn | SaveAction.ForceNewVersion;
var newReference = _contentRepository.Save(writablePage, saveAction, EPiServer.Security.AccessLevel.NoAccess);
var repository = ServiceLocator.Current.GetInstance<IContentVersionRepository>();