Can't unlock locked document ACS 7.2.1

Showing results for 
Search instead for 
Did you mean: 
Member II

Can't unlock locked document ACS 7.2.1


Hi, I am trying to unlock documents that are locked by an option: "Edit Offline" or "Edit Online". The given script executes in the javascript console in admin tools and it works only for documents edited online. When I want to execute it on a document that is blocked by offline editing, the following error occurs. I know that alfresco then creates a working copy of the document. Is there any way to unlock such a document?

// Get the node ID of the document
var nodeId = "8a0451e0-2db0-4664-820c-3fad38375ab5";

// Try to find the document node
var workNode = search.findNode("node", ["workspace", "SpacesStore", nodeId]);

// Check if the node is found
if (workNode != undefined) {
    // Perform operations on the document, e.g., unlocking["cm:lockOwner"] = "admin";
    workNode.unlock();["cm:lockOwner"] = "admin";
    logger.log("The document has been unlocked.");
} else {
    logger.error("The document with the specified ID was not found or an error occurred.");

Caused by: org.alfresco.service.cmr.lock.UnableToReleaseLockException: Unable to unlock node (id: 8a0451e0-2db0-4664-820c-3fad38375ab5) because it has been de-identified.