Copied to clipboard

Flag this post as spam?

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


  • Rihab 104 posts 388 karma points
    Oct 01, 2020 @ 10:49
    Rihab
    0

    I'm trying to use GetRelationsForItem to prevent the user from deleting a linked node

    Hi All,

    Plz Help, I'm using Umbraco 8.7.0 And I'm trying to prevent the user from deleting a linked node

    NexuEntityRelationService tt = new NexuEntityRelationService(_relations, _localize, _contentService, _contenttype, _media);
                   // var t = tt.GetRelationsForItem(content.Entity.GetUdi());
                    var t = tt.CheckLinksInDescendants(content.Entity.GetUdi());
                    IList<NexuRelationDisplayModel> test = tt.GetRelationsForItem(Udi.Parse(content.Entity.GetUdi().ToString()));
    

    GetRelationsForItem is triggering null reference error And CheckLinksInDescendants is Always returning false

    can you guide me to the right track?

    Rihab.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Oct 01, 2020 @ 13:22
    Dave Woestenborghs
    0

    Hi Rihab,

    Nexu will show the users a message in the delete dialog ?

    But you want to prevent deletion entirely ?

    Dave

  • Rihab 104 posts 388 karma points
    Oct 04, 2020 @ 08:26
    Rihab
    0

    yes, I need to prevent all deletion on a linked node

  • 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