08-30-2006 11:29 AM
* 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?
08-30-2006 12:43 PM
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?
08-31-2006 04:15 AM
08-31-2006 05:17 AM
ID:noderef
Note that the NodeRef.toString() can be used, but you will need to escape the ':' and '/' characters to '\:' and '\/' (yes annoying but needed for the lucene query parsing).
ID:workspace\:\/\/SpacesStore\/e4f30acf-e98b-11da-821a-936824f635fe
You can then execute the lucene query using the 'search.luceneSearch()' javascript call. The results from each query will be an Array of size 1 (assuming it finds the category - it should!) which will contain a correctly populated script Node object (i.e. you can execute .name and .properties or similar on it). So you query for each category in turn and that will give you what you need for now.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.