03-21-2019 04:57 AM
I'm trying to get the filename of the deleted document using a behaviour, this is my function :
public void onDeleteNode(ChildAssociationRef childAssocRef, boolean arg1) {
NodeRef nodeRef = childAssocRef.getChildRef();
String filename = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
System.out.println(filename);
}
the error in this line :
String filename = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
03-21-2019 06:03 AM
I changed onDeleteNode with beforeDeleteNode and I'm still facing same issue "Node does not exist"
public void beforeDeleteNode(NodeRef nodeRef)
03-21-2019 06:16 AM
Hello,
Maybe this post will be helpful for you:
Policy method 'beforeDeleteNode' gives an invalid NodeRef
Best,
03-21-2019 06:23 AM
Thanks.
It helps.
03-21-2019 04:04 PM
Also relevant https://www.google.es/amp/s/angelborroy.wordpress.com/2015/05/22/alfresco-implementing-delete-behavi...
03-22-2019 03:24 AM
Thanks.
Explore our Alfresco products with the links below. Use labels to filter content by product module.