Okay I gave this a go and I’m afraid I’m a bit stuck. The versioning is a bit tricky and I was hoping you could give me some advice.
I’ll start with what I’ve done thus far and where I’m at.
I’ve added another button called “Save and publish in future” which at the moment mimics the
OnSaveUnpublishedCommand method. (This should give me that new version in the db) The only thing I do extra is the following:
DateTime.Now; (Will get this from a date picker eventually)
I have a new class called PublishScheduledAction.cs and in the
override void Execute() method I pretty much did exactly what you said above. However I’m not sure how to get the correct version when I do
item.VersionOf is null, and as far as I understand I should instead be passing the “new or saved” version. I hope this make sense. How do I get the correct version so that I can effectively ReplaceVersion?
Thanks, much appreciated.