06-13-2012 01:43 PM
var insp = "@cm\\:name:DocA_name"; // it's hardcode. how to get DocA_name?
results = search.luceneSearch(insp);
for (var i = 0; i<results.length; i++){
results[i].createAssociation(document, "sc:DocA4DocB" );
}
document.save();
<type name="sc:DocA">
<title>DocA</title>
<parent>sc:document</parent>
<properties>
…
</properties>
<associations>
<association name="sc:DocA4DocB">
<title>DocA4DocB</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</type>
<type name="sc:DocB">
<title>DocB</title>
<parent>sc:document</parent>
<properties>
…
</properties>
<associations>
<association name="sc:DocB4DocA">
<title>DocB4DocA</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:DocA</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</type>
06-14-2012 02:19 AM
06-14-2012 04:06 AM
You could do it using behaviours so you don't have to set rules manuallyHi,
06-14-2012 05:31 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.