Search bbTopics:
2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009

Topic Title: need help on moving space via javascript

First Post:

I am beginer in learnig alfresco, and have this problem:

I need to move space (via javascript), from space that has applyed content rule - link to category.
Destination space doesnt have rules applyed. This is where i get the folowing error:

Code: Select allFailed to run Actions due to error: Found 1 integrity violations: The association parent multiplicity has been

violated: Target Node: workspace://SpacesStore/3e9054d6-527d-4c01-bf05-161262a4def1 Association: Association[

class=ClassDef[name={http://www.alfresco.org/model/rule/1.0}rules],

name={http://www.alfresco.org/model/rule/1.0}ruleFolder, target

class={http://www.alfresco.org/model/content/1.0}systemfolder, source role=null, target role=null] Required

parent Multiplicity: 1..1 Actual parent Multiplicity: 0


Here is my javascript :
Code: Select all
var source = companyhome.childByNamePath("Pisarnica/TEMP");

var destination = companyhome.childByNamePath("Pisarnica/DEST");

      items = source.children;

      for each(item in items)
      {
         item.move(destination);
      }

What is the right way to do this, and is there any other way?

Thanks, any help is welcome.





Link to original post: need help on moving space via javascript