10-05-2021 12:26 PM
Hi,
I'm trying to create a JavaScript file that destroy files when possible. However, I'm not finding a way to do that since, aparently, doesn't exist a document.destroy.
Is there some especific function that does this?
10-07-2021 08:54 AM
Can you provide a reference for that "destroy" function? Is something coming from the Java API?
10-07-2021 09:33 AM
https://hub.alfresco.com/t5/alfresco-content-services-hub/records-management-user-guide/ba-p/289598
This link shows the properties of some functions, including the rmarocessDestruction, which represents the destroy function. However when I try to get the boolean value of it, it returns undefined.
10-07-2021 09:46 AM
So you are using Record Management module with Enterprise (following the DOD 5015.2 structure).
In order to get the value of that property (rmarocessDestruction), the node type needs to a file plan (rma:filePlan).
Is your node of this type?
10-07-2021 10:20 AM
Yes, my node is a file plan.
10-07-2021 10:32 AM
And the result of the following line is null?
var destroy = document.properties["rma:processDestruction"];
That may indicate also false. Does this make sense?
10-07-2021 10:53 AM
my code is:
if (document.properties["rmarocessDestruction"] == true){
document.properties["rmc:TipoDeDocumento"] = "success";
}
else if (document.properties["rmarocessDestruction"] == false){
document.properties["rmc:TipoDeDocumento"] = "error";
}
else{
document.properties["rmc:TipoDeDocumento"] = "none";
}
document.save();
But it only changes to none.
Explore our Alfresco products with the links below. Use labels to filter content by product module.