AnsweredAssumed Answered

Accessing Aspects with JavaScript

Question asked by slothrop on Aug 7, 2007
Latest reply on Aug 13, 2007 by slothrop
I have a custom aspect defined as follows:
      <aspect name="custom:Reviewers">
            <property name="custom:Reviewer1">
       <property name="custom:Reviewer2">
       <property name="custom:Reviewer3">

The aspect appears as it should and I can add reviewers to documents with no problem.  I would like to write a script that accesses these reviewers and sends emails to them when the document is moved to a certain space. 

document.hasAspect("custom:Reviewers") returns true as it should but document.aspects.length is undefined as is 

document.aspects.size() returns 6 but I can't step through the aspects with since is undefined.  I can get an iterator with

   var docAspects = document.aspects;
   var it = docAspects.iterator();

but doesn't seem to return anything I can use.  One of the objects returned with does have a toString() that returns "{custom.model}Reviewers" but is undefined.

What am I missing?

Thanks in advance.