TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Remove "Working Copy Documents" from Alfresco
Muralidharan Deenathayalan
Sep 30, 2019
12.5
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
In this blog I will describe how to remove "working copy documents" from Alfresco.
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
Next Recommended Reading
How to Read Property Value from a NodeRef in Alfresco