AnsweredAssumed Answered

JavaScript API & NodeRef troubles

Question asked by simon on Aug 30, 2006
Latest reply on Aug 31, 2006 by kevinr
Hi Alfresco,

I'm trying to retrieve the categories attached to a document with JavaScript API in Alfresco Enterprise 1.3.1. I tried the example from the JavaScript WIKI with the "var locale = document.properties.locale.properties.name;" command. I added the locale aspect to the document but get this error:
* Failed to run Actions due to error: Failed to execute script 'workspace://SpacesStore/df918dab-380d-11db-9652-a5e698739f92': TypeError: Cannot read property "properties" from null (AlfrescoScript#25)
Tried the same for the categories but it returns a NodeRef for every category and I can't add the ".properties.name" after a NodeRef element, it returns the null object.
One special feature is all properties of type NodeRef are automatically converted into another Node object.
What does this mean? I think it's what I tried with both the locale and the categories but I can't get it to work. Any ideas?

Outcomes