I have written some javascript that traverses a folder and checks to see if any of the documents in that folder are locked using .isLocked.
This script does what it should apart from always giving an error "Failed to save content: Transaction silently rolled back because it has been marked as rollback-only"
Generally this error comes when you have nested transaction and error comes in one transaction then in parent transaction it shows that transaction has been already marked as rollback-only.Try to debug your code it must have some specific error.
<javascript> var dataLocation = companyhome.childByNamePath("Sites/cfm-administration/documentLibrary/Testing/Locked"); var children = dataLocation.children; var node;
function traverse(nodes) { for each(node in nodes) { var lockStatus = node.isLocked; if (node.isContainer) { traverse(node.children); } else { if (lockStatus == 1) { createEntry(node); } } } }