Just a follow-up on what I think caused the problems. It seems that the site I was deploying this form to is claims-based, which is what was causing a lot of the permissions errors. Too bad the developer didn't think of that earlier. =/
Steps:
1. Error: "Error ocurred submitting data to list: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed."
Changed trust level in application web.config file system.web section: <trust level=”WSS_Medium” originUrl=”” />
2. Error: "Error ocurred submitting data to list: Request failed."
Added a rule on the QdabraRules data source finishedLoading attribute to set the useWebServices attribute to true. You'll want a condition on the rule - if finishedLoading = true, set useWebServices to true.
After figuring out that I couldn't deploy the form from Central Admin (and instead had to do it from "Site Collection Features"),
3. Error: "Access denied. You do not have permission to perform this action or access this resource."
Converted SPSubmit to a UDC file.
4. Still getting error: "Access denied. You do not have permission to perform this action or access this resource."
5. Errors behind the scenes:
Failed to get SPGroupName from GroupID. Error Message: Group cannot be found. Callstack:
at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)
at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).
Batchmgr Method error. Errorcode: 0x2ac7aa00. Error message: Access denied. You do not have permission to perform this action or access this resource.
Noticed that we had gotten
Failed to get SPGroupName from GroupID before. Was also told by developer that this a was claims-based site. Resolved by doing the following (got this from this article:
Using UserProfileService.asmx and UserGroup.asmx with an Infopath form. You have to go way down to the second reply by Peter87):
<quote>
As is generally best practice, your data connection file should be exported to a Universal Data Connection File (.udcx) file and saved to a Data Connection library in SharePoint. By default when you export a udcx file you get the following at the bottom
<!-- udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication
-->
This means we're not specifying any authentication and trying to use the current user's permission. However, I believe there's a double hop issue when trying to connect to UserProfileService.asmx and SharePoint is using nt authority\iusr. We need to provide a specific account to connect to the web service as. I created a secure store application ID called InfoPath and my data connection file now has this entry
<udc:Authentication>
<udc:SSO AppId="InfoPath" CredentialType="NTLM" />
</udc:Authentication>
Finally, instead of calling a method on UserProfileService.asml with no parameters and getting the current user by default, you have to be explicit about what user you're querying for. Stop the data connection from connecting automatically on form load and add a form load action with two steps
- Set the query parameter in the web service call to the current user using concat("domain\",username())
- Query the data connection</quote>
6. SUCCESS!!