Showing posts with label unlock documents. Show all posts
Showing posts with label unlock documents. Show all posts

Tuesday, 25 October 2016

Unlock all the documents which are checked out by a inactive user

Usecase: There are many users who have left the organization and the documents which are checked out by them and still locked. How can I find them all and unlock them. 


Solution:

1. Find the list of documents which are checked out by a user who is inactive in the system. This can be achieved through the below DQL query.

select * from dm_document where r_lock_owner in (select user_name from dm_user where user_state = 1) 

2. From the extracted list now the documents has to be unlocked through API command.

unlock,c,<r_object_id of the document>

3. when the list is very big then you can use the excel to generate the API commands using concatenation function.