Showing posts with label unlock. Show all posts
Showing posts with label unlock. 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. 

API to Unlock the checked out documents

Use case : How can I cancel checkout(Unlock) the document  which is locked by another user.


Solution: The user can execute the below API command to unlock the document. 


unlock,c,<r_object_id>


The above is the api command to unlock the document which is checked out by another user, to execute the command the user must have minimum of Administrator access.