Skip to main content
Nintex Community Menu Bar

discard/checkin form checked out by other user

  • June 27, 2016
  • 3 replies
  • 87 views

Forum|alt.badge.img+5

how can I discard/check-in form checked out by other users?

3 replies

Forum|alt.badge.img+12
  • June 28, 2016

Hi,

This article might be of help: http://community.k2.com/t5/K2-blackpearl/How-to-check-in-K2-form-on-behalf-of-another-developer/ta-p/76707
Please remember to make a backup of the K2 db before doing this in case of the need to rollback.


Forum|alt.badge.img+7

Hi,

 

Please follow below steps and make sure you take the backup of your K2 DB before running the scripts;

 

Step 1:  To check in any form/view we need to have its GUID value, open the designer and select the form which is checkedout, in the URL you will find the parameter “guid” with its value.

Copy the guid value and run the following query to get the result.

USE K2

SELECT * FROM Form.AuditLog WHERE UserID = 'K2:DENALLIXob' AND

Data = '088499ec-e626-41de-a0ac-26c76deb3297' ORDER BY  DateTime DESC

 

Step 2: In SQL Management Studio, run this SQL query to find the Form that has been checked out: 

DECLARE @MyTable Form.ContextTableType

 

INSERT INTO @MyTable([ID], [Type])

VALUES ('088499ec-e626-41de-a0ac-26c76deb3297', 'F') -- Replace the ID with the View ID/Form ID, third parameter value is 'V' for views and 'F' form forms

 

exec [Form].[aCheckInContexts] @UserID='K2:DENALLIXob', @ContextData=@MyTable -- Replace 'UserName' with the actual username

 

Hope it helps!

 

Cheers,

Prajwal Shambhu


  • August 9, 2019

Hi,

If I want to execute this code in other database apart from K2, how to do that? Because I could not declare the variable of Type Form.ContextTableType out of K2 database.

 

Regards,

Shikha Sharma