AnsweredAssumed Answered

Copy site space on site delete

Question asked by tytanix on Dec 12, 2013
Latest reply on Dec 16, 2013 by tytanix
Hello everyone!
I will explain my scenario:
in the company where i'm working, when a project starts, a collaborative site for that project will be created. Team members of the project should be invited to this site. During the lifecycle of the project, many document are stored in the space of the site. At the end of the project, its site will be deleted. After that, all documents about the project will be lost. To avoid this, we have tried to set a rule on Sites folder, that on delete of elements, these elements have to be moved in another folder. After applying this rule, we are no longer able to delete sites. If we remove the rule, sites can be deleted. Now we want to try to implement a javascript to achieve our purpose but we are not able to understand how to do that. While working with document, we can access to a document with "document." key word.
How could the same thing be done with spaces?
If we use the key word "space." the rule doesn't work as expected because "space" refers to the space on which the rule is applied (Sites folder in our case). So the question is: how can i access to the space that is going to be deleted in the same way used when working with a document?

Thank you for your attention!

Outcomes