Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Remove "Working Copy Documents" from Alfresco
WhatsApp
Muralidharan Deenathayalan
5y
12.8
k
0
0
25
Blog
Remove working copy documents in Alfresco Explorer or Alfresco Share
Yesterday I've been asked to cancel all the working copy documents from alfresco sites.
So, I've used JavaScript API to cancel all the working copy documents.
Step 1
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"
);
}
How to Remove Working Copy Documents from Alfresco
Up Next
How to Read Property Value from a NodeRef in Alfresco
Ebook Download
View all
Solutions Manual to Objects First with Java – A Practical Introduction using BlueJ
Read by 1.8k people
Download Now!
Learn
View all
Membership not found