Update Document Property gives No Document exists with Version error
Hi, I was just doing a very simple property update and no matter what id I use I get a No Document exists with Version error. This happens from my page that's doing the update plus I also get the same error when I click on the item in the CMS.
I tried doing a rollback but that produces the same error. My code is below. It's pretty simple so i don't know what is going on. Can someone shed some light on the subject please?
Document doc = new Document(1097);
doc.getProperty("update").Value = 5;
doc.Save();
User publisher = User.GetUser(User.getUserId("admin", "password"));
doc.Publish(publisher);
umbraco.library.UpdateDocumentCache(doc.Id);
Update Document Property gives No Document exists with Version error
Hi, I was just doing a very simple property update and no matter what id I use I get a No Document exists with Version error. This happens from my page that's doing the update plus I also get the same error when I click on the item in the CMS.
I tried doing a rollback but that produces the same error. My code is below. It's pretty simple so i don't know what is going on. Can someone shed some light on the subject please?
Got it. I just entered 0 as the user id instead of getting the idea from the username and password.
is working on a reply...