AnsweredAssumed Answered

Inherit metadata from space

Question asked by buurd on Aug 15, 2008
Latest reply on Aug 21, 2008 by buurd

i'm trying to write a script that will make sure that all documents in a space will be populated with some common metadata from the space. But I can't get the code working (se code below). Am I using the alfresco api in the wrong way??

Thanks in advance

* CopySpaceMetadata
* This script makes sure that a content "inherits" is containing space metadata.
* It will not overwrite already existing metadata about the content

// Make sure that the content have the aspects the space has
for(var i in space.aspects){

// Set the properties from the space to the content, unless they already are set
for(var i in{
    if([i] == null){[i] =[i];