Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using:
Document doc = Document.MakeNew(name, dt, author, parentid);doc.getProperty("messahe").Value = "Hello World";doc.Save();umbraco.library.UpdateDocumentCache(doc.Id);
To make a new document/node, it makes the doc/node no problem, but it does'nt save property data.Any ideas?
Ah you have to use doc.setProperty,
but weird how:
Media media = new Media(startMedia.Id);media.getProperty("galleryPassword").Value = password.ToString();media.Save();
Works ok.
Can I ask, how new is doc.setProperty?
I didn't know that method existed as I often use doc.getProperty to set values and works in 4.7.x.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Document MakeNew not saving property data
I'm using:
Document doc = Document.MakeNew(name, dt, author, parentid);
doc.getProperty("messahe").Value = "Hello World";
doc.Save();
umbraco.library.UpdateDocumentCache(doc.Id);
To make a new document/node, it makes the doc/node no problem, but it does'nt save property data.
Any ideas?
Ah you have to use doc.setProperty,
but weird how:
Media media = new Media(startMedia.Id);
media.getProperty("galleryPassword").Value = password.ToString();
media.Save();
Works ok.
Can I ask, how new is doc.setProperty?
I didn't know that method existed as I often use doc.getProperty to set values and works in 4.7.x.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.