Remove working copy documents in Alfresco Explorer or Alfresco Share
First, get all the node references of the working copy
documents using search service.
Step 2
Use the nodeservice to cancel the working copy
document.
- var results = search.selectNodes("workspace://SpacesStore", "descendant::*[hasAspect('cm:workingcopy')]");
- logger.info("Total rows" + results.length);
- for (var i = 0; i < results.length; i++) {
- var node = results[i];
- var nodename = node.name;
- node.cancelCheckout();
- logger.error(nodename + " cancelled");
- }
Join the conversation! Your thoughts help the community grow.