Automatic checkout / check-in in InfoPath 2013 with SharePoint 2013


Automatic checkout / checkin in InfoPath 2013 with SharePoint 2013
=========================================
 
Checkin check out steps :
=========================================
 
# Create a blank form publish it to forms library.
 
# create a data connection library in the site.
 
# start secure store service and create a secure store service application
 
# configure SSA as per the blog 
 
http://blogs.technet.com/b/rajbugga/archive/2013/08/07/infopath-over-claims-authentication-sharepoint-2010-amp-2013.aspx
 
#Steps for editing UDCX file needs to be done later on.
 
# open the xsn for the published form from the saved location.
 
# create receive data connection to forms library select the following 
 
 
 
# make sure you select the include data for the active form check box.
 
# select retrieve data on form load
 
# Now we will create couple of SOAP based receive connections to lists.asmx.
 
# checkout file connection 
 
 
 
# select checkoutfile 
 
 
 
 
# couple of next and on the last screen, uncheck auto retrieval of data 
 
 
 
# follow the same steps to create checkinfile connection
 
# add a dummy status field on the form ( this we will use as a dummy action for the rule that checks if the form is already checked out ) 
 
# Now we will create the rules for checkout operation 
 
Form load –> rule1 
 
Condition :
 
 
 
 
 
 
Action Set fields value : ( setting our dummy field to blah blah ) 
==
 
 
 
Select don’t run remaining rules 
 
Rule2:
====
 
Condition 
 
 
 
 
 
 
Actions : ( we have 4 of them, 3 set field values and 1 query data, maintain the sequence ) 
 
==
 
Set fields value 
 
 
 
 
 
Set field value 2:
 
 
 
 
 
 
 
Set field value 3
 
 
 
 
 
 
 
Query data 
 
 
 
=============
 
Now for checkin :
======
 
#Insert a button in the form:
==
 
# Add 1 rule with 3 set field actions and 1 query data ( maintain the sequence ) 
 
Condition : when the button is clicked 
 
Actions :
 
Set field value 1
 
 
 
 
 
 
Set field value 2
 
 
 
 
 
 
 
Set field value 3
 
 
 
 
 
 
Query data :
 
 
 
# Now we are done with the connections and rules we need.
 
# convert both checkout file and checkin file connections to UDCX and upload both in the data connection library we created initially.
 
# download and edit both of them as follows and upload it back 
 
Uncomment udc:authentication tag and povide APPid and CredentialType, APPID here is the targetapplicationID we created in secure store
 
<udc:Authentication><udc:SSO AppId='APPSA' CredentialType='NTLM' /></udc:Authentication>
 
# In Central admin configure infopath services select 
Allow user form templates to use authentication information contained in data connection files 
 
# publish the form again to the forms library
Comments (5)

  1. Rafal says:

    I’ve managed to configure this but form is checked out to account specified in SSO – my requirement is to have it checked out to the users that opens form. Any idea how to tackle?

    1. Greg McAllister says:

      Same here…has anyone solved this issue?

  2. spdev says:

    I keep getting an error message with the checkout list service. It is not able to find the file to check it out – this is only happening with new files. Should it even be checking out new files??

  3. Shruti says:

    where is your form published?

  4. Shruti says:

    Hi,

    I have performed all the steps for check out. I am able to connect to web service. When I click on check out it does not give me any error but it does not check out the document as well. Do you know where can I start debugging this?

    Thanks,
    Shruti

  5. Greg McAllister says:

    Further information on the issue of not being able to check out a file:

    My form is web based. Checkoutfile sets the Checked Out By field to ‘System Account’ used in Central Admin Authorization. In a test of the process we discovered that
    1. the correct user is returned by the GetUserByName process,
    2. that CheckOutFile actually runs and if the user (i.e. Test User) checks out the file via SharePoint first and CheckOutFile returns a 5566 error
    3. but if we run the DiscardCheckOut process that runs and actually knows that I am Test User and because of the match it DOES remove the checkout.

    To verify
    1. we checked out the file using checkoutfile process and the user that showed as checked out by was ‘System Account’
    2. and when attempting to discard it failed with a 5566 error (makes sense because Test User is not System Account).

    This leads me to believe that the failure of the CheckOutFile service to use the current user (Test User in the testing) to actually check out the file (instead of System Account) is a bug because if it wasn’t a bug then CheckInFile or DiscardCheckOut file would not correctly function. Let me know what you think.

Skip to main content