cancel
Showing results for 
Search instead for 
Did you mean: 

How to get original document object from link document object?

lex91
Confirmed Champ
Confirmed Champ

Context:

I have created a link for a document with the "Copy to-> Create link" feature in alfresco share. I have the nodeRef and from that the document object of the link.

Question:

How do I get the original document's nodeRef or document object using the JS APIs? 

1 ACCEPTED ANSWER

krutik_jayswal
Elite Collaborator
Elite Collaborator

When we create a link the type of content which is getting created is "app:filelink". There is property associated with this type named as cm:destination. This contains the details of actual nodeRef.

So in javascript you can get it by node.properties["cm:destination"].

View answer in original post

2 REPLIES 2

krutik_jayswal
Elite Collaborator
Elite Collaborator

When we create a link the type of content which is getting created is "app:filelink". There is property associated with this type named as cm:destination. This contains the details of actual nodeRef.

So in javascript you can get it by node.properties["cm:destination"].

Thank you! That was what I was looking for.