How to overwrite others checked out files

  • 25 August 2015
  • 0 replies
  • 13 views



 

Symptoms


One of our contractor's user account has been deleted and unfortunately he left two files checked out in the K2 Designer. Can we check it in by using other accounts please?
 

Diagnoses


This can be performed by using the Stored Procedure that K2 designer uses to check in viewsforms.
 

Resolution

DISCLAIMER: Direct input into the K2 database is highly discouraged and in some instances, may not be supported.
Please take a full database backup prior to doing this change.
If in doubt, log a ticket first and add a link to this article.

I'm using an example user and ID below. Please change as necessary.
All SELECT statements are run under the K2 database.

Step 1: get the info.
--For checked out views
SELECT ID, DisplayName, CheckedOutBy
FROM Form.View_Design
WHERE CheckedOutBy = 'K2:DenallixAdministrator'

--For checked out forms
SELECT ID, DisplayName, CheckedOutBy
FROM Form.Form_Design
WHERE CheckedOutBy = 'K2:DenallixAdministrator'

Step 2: run the check-in
The 'Type' in the table variable will be 'F' if you are checking in a form and a 'V' if you are checking in a view.

--FORCE CHECK IN
DECLARE @MyTable Form.ContextTableType
INSERT INTO @MyTable([ID], [Type])
VALUES (N'97CD2824-D36D-46A7-97AF-BA0F2DFF06CD', 'F')
EXEC [Form].[aCheckInContexts] @UserID= N'K2:DENALLIXAdministrator', @ContextData=@MyTable
--Note: the ID above must be in the format: N''

That will check in the formsviews you need.
I'd recommend running the check-ins one at a time.

You can test this first by creating a test viewform, leave it checked out and then run through the process.




 

0 replies

Be the first to reply!

Reply