Delete a link automatically

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Delete a link automatically

In Alfresco, when you delete a document that has associated links, these links are automatically deleted.

However, I have created a link to a document using the CMIS (Apache Chemistry PortCMIS client library for .NET) and when I delete de document, these links are NOT deleted.


In fact, if I try to delete the links and the original document has already deleted, Alfresco throws an error because the links reference a document that doesn´t exists.

Is there any property to take into account when the links are created, so that they are automatically deleted?

2 Replies
Highlighted
Senior Member II

Re: Delete a link automatically

When you create the link in alfresco basically it creates a child association in alfresco.Suppose if you are creating the link of document which resides in "Repository>User Homes>Krutik>kjayswal.doc" in this case it will create a document link inside the "Repository>User Homes>Krutik>kjayswal.doc>kjayswal.doc"

There can be two parent in alfresco for single document,but primary parent can only be one.

It seems that below is code which gets executed when you create the link.This may not solve your problem but, will help you to reach out to the cause.

alfresco-share-create-link/CreateLinkPost.java at master · skomarica/alfresco-share-create-link · Gi...  

Active Member

Re: Delete a link automatically

I have discovered what the problem was.

When we create a link, we have to add to the original document the next Secondary Type:

P:app:linked: Marker aspect to indicate that the node has been linked.