cancel
Showing results for 
Search instead for 
Did you mean: 

How to build relationship between two documents in Alfresco Share

andy2_0
Champ in-the-making
Champ in-the-making
How to build relationship between two documents in Alfresco Share? for example, document A refer to document B.

Thanks for help!
6 REPLIES 6

rjohnson
Star Contributor
Star Contributor
Create an association.

andy2_0
Champ in-the-making
Champ in-the-making
Hi Johnson, thanks for response!

Then how to create an association in alfresco share? Need to develop an extension?n

Again thanks!

rjohnson
Star Contributor
Star Contributor
You can create an association in Edit properties by setting a "Related document" You can also do it in a webscript using Javascript or Java.

In what context are you trying to create these associations?

andy2_0
Champ in-the-making
Champ in-the-making
Hi Johnson, while editing the properties I don't find a "related document" property, I also went thru all the aspects and couldn't find such a property.

The scenario is:

a team is composing a book, they follow the steps below:
(1) break down the book into several components;
(2) collect materials, each piece of a material may be presented as a document, a wiki or a blog in alfresco share;
(3) compose the book components with the collected materials. Here the associates will be used to identify which materials are used to composed a paragraph of the component.

Do you have any good idea on this issue?

Thanks!

rjohnson
Star Contributor
Star Contributor
What you could do is to create a custom document type that extends cm:content and adds an association to it. This will then allow you to make your "book" this document type with say the table of contents and then attach the components as related documents.

Now, if you want to make a single document out of all your related documents then you need to make the documents PDF and then you could write a Javascript to invoke PDFBoz (or iText) to merge the PDFs into a single document. This last part is a bit tricky, but not really hard.

What you cannot do though is "associate" one document with another within the content of the document itself.

andy2_0
Champ in-the-making
Champ in-the-making
Really appreciate your help, I will try and let you know the result. Thanks!