AnsweredAssumed Answered

onDeleteNodePolicy

Question asked by riadhazzouz on Mar 21, 2019
Latest reply on Mar 22, 2019 by riadhazzouz

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


Outcomes