AnsweredAssumed Answered

How to retrieve associations of a content type

Question asked by darkredd on Nov 22, 2013
Latest reply on Nov 25, 2013 by darkredd
Good day,

I am trying to retrieve known associations off a type that is attached to a node using javascript. I have tried several ways that seems not to work, or perhaps I just do not know. Here is the script I am running in attempt of achieving this.

<javascript>
var originalUser = people.getPerson("vusanim");
var delegatee;

if(originalUser.hasAspect("alvexoc:orgchartMember"))
{
   if(originalUser.properties["alvexoc:outOfOffice"] == true)
   {
      
      delegatee = originalUser.childAssocs["alvexoc:delegation"][0].typeShort;
      logger.log(delegatee + " %%% " + delegatee.assocs["alvexoc:delegationTarget"] + " ******************** ");
   }
   else
   {
      logger.log(delegatee + " *******$$$$$$$$*******");
   }
}
else
{
   logger.log("Person is in the office ********************");
}
</javascript>

I am using alvex module as you can see, when I do a node browse of this all properties are available. As you can see I also tried the "associations()" method to no success.

How can I retrieve the associations I want from this type.
I would appreciate the help.

Outcomes