need help on moving space via javascript

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 05:08 AM
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 doesn't have rules applyed. This is where i get the folowing error:
Here is my javascript :
Thanks, any help is welcome.
I need to move space (via javascript), from space that has applyed content rule - link to category.
Destination space doesn't have rules applyed. This is where i get the folowing error:
Failed 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 :
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.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2009 07:59 AM
OK, i have managed to do this by copying items from source folder, and then deleting them.
