Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sherry Ann Hernandez 320 posts 344 karma points
    Jun 11, 2011 @ 13:37
    Sherry Ann Hernandez
    0

    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.

    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();

    }

    }

     

  • 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.

Please Sign in or register to post replies