I am trying to implement the "Relate copied items to original" functionnality. Basically, on parent update I am copying all properties values to its childs.
here is my code :
Document copy = new Document(r.Child.Id);
foreach (umbraco.cms.businesslogic.property.Property p in documentObject.getProperties) { copy.getProperty(p.PropertyType.Alias).Value = p.Value; } //copy.Save();
It is working as I want but I thougt that I would have to save (copy.Save();) childs documents at the end but I noticed that it is not necessary...
I was just wondering why is it not required and what is the Save() function for ?!
Document..Save() function... what for ?
Hi guys
I am trying to implement the "Relate copied items to original" functionnality. Basically, on parent update I am copying all properties values to its childs.
here is my code :
It is working as I want but I thougt that I would have to save (copy.Save();) childs documents at the end but I noticed that it is not necessary...
I was just wondering why is it not required and what is the Save() function for ?!
See http://www.aaron-powell.com/the-great-umbraco-api-misconception, it's just like that.
Awesom
it is good to know, thanks a lot atze187
If you call the Save Method, BeforeSave and AfterSave events are fired.
is working on a reply...