cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript API - acess to aspect properties

nancygaillard
Champ on-the-rise
Champ on-the-rise
Hi !

I am creating a script for a rule which create a reference for a file B to A where A references B.
I am working on a Windows 7 64 bits with Alfresco 4.2.e

My problem is that I can't find the aspect properties…

The aspect : cm : referencing, the property : cm:references

visible on Share, editable…

absent on the list of properties (document.getPropertyName(true)
present on the list of aspects (in document.aspects which is an array of strings)

but I need to know the referenced file to continue my script.

Somebody knows how to do?
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
cm:references is an association ,not a property.
If your node has cm:referencing aspect,just using

mynode.assocs["cm:references"][0];// for target associations of the node
mynode.sourceAssocs["cm:references"][0];//for  source associations to this node

For detail information ,please refer to https://wiki.alfresco.com/wiki/4.0_JavaScript_API

nancygaillard
Champ on-the-rise
Champ on-the-rise
Thank you
Merci beaucoup Smiley Happy