cancel
Showing results for 
Search instead for 
Did you mean: 

Copy site space on site delete

tytanix
Champ in-the-making
Champ in-the-making
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!
2 REPLIES 2

marco_altieri
Star Contributor
Star Contributor
Hi,

The object "document" can be also a space. It depends on how the rule is configured. If you have configured the rule to be executed on object of type "Folder", the "document" object will be a folder.

tytanix
Champ in-the-making
Champ in-the-making
Thank you very much for your answer. This has solved my problem!