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
Can anybody tell me how can I delete the related documents?
I'm using the following code but it is not deleting the related documents.
Document originalDocument = new Document(sender.Id); if (originalDocument.Relations.Length > 0){ foreach (Relation r in originalDocument.Relations){ Document doc = new Document(r.Child.Id);doc.delete( true);r.Delete();umbraco. library.RefreshContent();}}
Document
originalDocument = new Document(sender.Id);
if (originalDocument.Relations.Length > 0)
{
foreach (Relation r in originalDocument.Relations)
Document doc = new Document(r.Child.Id);
doc.delete(
true);
r.Delete();
umbraco.
library.RefreshContent();
}
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
how do I delete the related documents?
Can anybody tell me how can I delete the related documents?
I'm using the following code but it is not deleting the related documents.
is working on a reply...