<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can't unlock locked document ACS 7.2.1 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/can-t-unlock-locked-document-acs-7-2-1/m-p/140351#M37503</link>
    <description>&lt;P&gt;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?&lt;/P&gt;&lt;PRE&gt;// 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
    workNode.properties["cm:lockOwner"] = "admin";
    workNode.unlock();
    workNode.properties["cm:lockOwner"] = "admin";
    workNode.removeAspect("cm:lockable");
    workNode.save();
    delete workNode.properties["webdav:opaquelocktoken"];
    delete workNode.properties["webdav:lockScope"];
    delete workNode.properties["webdav:lockDepth"];
    workNode.save();
    logger.log("The document has been unlocked.");
} else {
    logger.error("The document with the specified ID was not found or an error occurred.");
}&lt;/PRE&gt;&lt;P&gt;Caused by: org.alfresco.service.cmr.lock.UnableToReleaseLockException: Unable to unlock node (id: 8a0451e0-2db0-4664-820c-3fad38375ab5) because it has been de-identified.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 16:51:22 GMT</pubDate>
    <dc:creator>MCGrzig</dc:creator>
    <dc:date>2024-02-12T16:51:22Z</dc:date>
    <item>
      <title>Can't unlock locked document ACS 7.2.1</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-t-unlock-locked-document-acs-7-2-1/m-p/140351#M37503</link>
      <description>&lt;P&gt;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?&lt;/P&gt;&lt;PRE&gt;// 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
    workNode.properties["cm:lockOwner"] = "admin";
    workNode.unlock();
    workNode.properties["cm:lockOwner"] = "admin";
    workNode.removeAspect("cm:lockable");
    workNode.save();
    delete workNode.properties["webdav:opaquelocktoken"];
    delete workNode.properties["webdav:lockScope"];
    delete workNode.properties["webdav:lockDepth"];
    workNode.save();
    logger.log("The document has been unlocked.");
} else {
    logger.error("The document with the specified ID was not found or an error occurred.");
}&lt;/PRE&gt;&lt;P&gt;Caused by: org.alfresco.service.cmr.lock.UnableToReleaseLockException: Unable to unlock node (id: 8a0451e0-2db0-4664-820c-3fad38375ab5) because it has been de-identified.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 16:51:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-t-unlock-locked-document-acs-7-2-1/m-p/140351#M37503</guid>
      <dc:creator>MCGrzig</dc:creator>
      <dc:date>2024-02-12T16:51:22Z</dc:date>
    </item>
  </channel>
</rss>

