Hi Pob
There is no proper way of checking in than going into the database and tricker the tables
There is an existing Feature Request for this which you can upvote here: https://ideas.k2.com/ideas/APIT-I-336.
Ref:https://help.k2.com/support-services/kbt142123
OR you can follow the information below:
Always create a full backup of the K2 database prior to running the below steps.
Rollback:
1. Stop K2 service
2. Apply DB backup
3. Start K2 service
How-to Steps
I'm using an example User and Form ID below. Please change as necessary.
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'); -- this is the ID returned from the query above
EXEC [Form].[aCheckInContexts] @UserID= N'K2:DENALLIXAdministrator', @ContextData=@MyTable;
--Note: the ID above must be in the format: N'<viewform ID>'
That will check in the formsviews you need.
Additional notes:
- It is recommended to run the check-ins one at a time.
- If you would prefer to undo the checkout, you can perform a similar process and use the [K2].[Form].[aUndoViewsCheckout] sproc.
- Testing this first by creating a test viewform, leave it checked out and then run through the process.
Ref: https://help.k2.com/support-services/kbt150389
Also visit this link: https://help.k2.com/support-services/kbt142123
Regards
Elvis