How to get original document object from link document object?

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

How to get original document object from link document object?

Jump to solution

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 Solution

Accepted Solutions
Highlighted
Senior Member II

Re: How to get original document object from link document object?

Jump to solution

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 solution in original post

2 Replies
Highlighted
Senior Member II

Re: How to get original document object from link document object?

Jump to solution

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 solution in original post

Highlighted
Active Member II

Re: How to get original document object from link document object?

Jump to solution

Thank you! That was what I was looking for.