04-29-2011 05:53 AM
var isCompAdded = "ASPECT:\"{http://www.alfresco.org/model/content/1.0}complianceable\"";
var searchQuery = isCompAdded;
var results = search.luceneSearch(searchQuery);
for(var i=0; i<=results.length; i++)
{
if(results[i] != null)
{
log += "File Name:" + results[i].properties.name + "\n";
}
}
org.alfresco.scripts.ScriptException: 03290000 Failed to execute script 'workspace://SpacesStore/6b12ff23-fc8e-451e-b860-17e14f723a1a': Node does not exist: workspace://SpacesStore/45560937-a9a9-496d-a04a-ba3cf674260f
for(var i=0; i<=results.length; i++)
{
if(results[i] != null)
var removeDate = results[i].removeAfter;
{
log += "File Name:" + results[i].properties.name + "remove date: " + removeDate + "\n";
}
}
04-29-2011 07:25 AM
var log = "Script Excecuted For complianceable aspect (remove after) work? \n\n";
var logFile = companyhome.childByNamePath("complianceable_log.txt");
var presentDate = new Date();
var docRemoveDate;
if (logFile == null)
{
logFile = companyhome.createFile("complianceable_log.txt");
}
if (document.properties["cm:removeAfter"] < presentDate) {
log += presentDate + "File Name:" + document.properties.name + "\t" +"Remove Date:" + document.properties["cm:removeAfter"] + "\n";
document.remove();
}
logFile.content += log;
var log = "Script Excecuted For complianceable aspect (remove after) work? \n\n";
var logFile = companyhome.childByNamePath("complianceable_log.txt");
var presentDate = new Date();
var docRemoveDate;
if (logFile == null)
{
logFile = companyhome.createFile("complianceable_log.txt");
}
var isCompAdded = "ASPECT:\"{http://www.alfresco.org/model/content/1.0}complianceable\"";
var searchQuery = isCompAdded;
var results = search.luceneSearch(searchQuery);
for(var i=0; i<=results.length; i++)
{
if(results[i] != null)
{
if(results[i].properties["cm:removeAfter"] < presentDate)
log += presentDate + " File Name:" + results[i].properties.name + "\t" +"Remove Date:" + results[i].properties["cm:removeAfter"] + "\n";
results[i].remove();
}
}
logFile.content += log;
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.