how to find the relation.child.id to related document id?
hello ,
I am new to Umbraco using umbraco 4.7.2 and used relation api to create the related documents/nodes ....now for some operations and actions like unpublish,delete and hide in navigation , i wannt to find the related document/node id i.e [that is] [ relation.child.id == currDoc.id ] if true then perform the action. i had retrun the following code but does'nt help much.
how to find the relation.child.id to related document id?
hello ,
I am new to Umbraco using umbraco 4.7.2 and used relation api to create the related documents/nodes ....now for some operations and actions like unpublish,delete and hide in navigation , i wannt to find the related document/node id i.e [that is] [ relation.child.id == currDoc.id ] if true then perform the action. i had retrun the following code but does'nt help much.
Document currDoc = new Document(sender.id);
Relation[] relations = Relation.GetRelations(sender.Id);
foreach (var relation in relations)
{
if (relation.Child.Id == sender.Id)
{
// relation.Delete();
currDoc.delete(); // delete the related document/node.
}
}
is working on a reply...