Tag Archives: InfoPath

InfoPath 2013 incompatible with SharePoint Designer 2010

Problem

You have InfoPath 2013 running on your computer. When you try to customize an InfoPath form template from a workflow in SharePoint Designer 2010, nothing happens. The form does not open in InfoPath.

Work-around

Install InfoPath 2010 along-side your Office 2013 installation and restart SharePoint Designer. Your form should now open in InfoPath 2010.

Comments ( 0 )

InfoPath Form Publish Soap

Problem

You try to publish an InfoPath form and get the following error:

The publish operation could not be completed. It cannot be determined if the form template was successfully published. Try publishing the form template again, or change the list settings to use the default sharepoint form. The SOAP message cannot be passed.

Cause

This error usually occurs when you have a large number of items in your list and the request is getting timed-out by IIS.

Solution

This problem can be fixed by increasing the time-out in the web.config of your SharePoint IIS site. Note that you will have to perform the same update on all your web front ends for each of the web applications that have the error. Add the bold part in the above code snippet, this will set the time out to 600 seconds, or 10 minutes.
<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_minimaltrust.config" />
<trustLevel name="WSS_Custom" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\config\wss_custom_wss_minimaltrust.config" />
</securityPolicy>
<httpHandlers />
<customErrors mode="On" />
<httpRuntime maxRequestLength="51200" executionTimeout="600" />  
<authentication mode="Windows" />

Comments ( 0 )

Workflow initiation form postback error

Problem

I am creating a customized version of the OOTB ‘Approval – SharePoint 2010’ workflow. What I did was basically select the Global Reusable workflow and made a copy of it. The workflow publishes without any problems. However, when I try to add the workflow to a SharePoint list and nominate an approver, I get the following error:

The following error gets logged in the event log:

There was a form postback error. (User: domain\andrew.toh, Form Name: Template, IP: , Request: http://sharepoint/_layouts/CstWrkflIP.aspx?List={7E380371-9012-4582-934E-79A47AE75A5E}, Form ID: urn:schemas-microsoft-com:office:infopath:workflowInitAssoc:-AutoGen-2012-07-20T00:41:31:452Z, Type: SchemaValidationException, Exception Message: Schema validation found non-datatype errors.)

ULS Logs

SharePoint Foundation Web Controls Medium 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).

Solution

To work-around this problem, I had to install SharePoint Designer 64 bit, re-copy the OOTB workflows, modify them, and re-publish.

Comments ( 0 )

SharePoint Multiple WFE Double Hop Authentication Fix

Problem

When you have more than 1 web front end configured with load balancing / DNS round-robin, you will find that web service calls start to fail. For example, the GetUserProfile function that allows you to look up user information from the User Profile database will fail with the following error.

The remote server returned an error: (401) Unauthorized.

Cause

This is due to a double-hop authentication issue and occurs when you are using NTLM as your authentication method. Several guides suggest using Kerberos as a fix but our environment is not ready to implement it yet. Kerberos is also a pain in the ass to set up and work with.

Work Around

Note that this is not a solution but a work-around. We eventually want to go with Kerberos in our environment, but in the meantime the following work-around is sufficient for us. You will need to do two things to get this working.

Modify the host file on all your Web front end servers.

  1. Browse to c:\windows\system32\drivers\etc
  2. Open NotePad as an administrator and open the ‘hosts’ file located in the above directory.
  3. Copy the contents of the file.
  4. Run another instance of NotePad as an administrator and paste the copied contents into the new file.
  5. Delete the ‘hosts’ file located in step 1.
  6. Add the hostnames for the websites you are hosting and point it to the REAL IP address of the server, e.g. 192.168.1.212.
  7. Save the file in the same location as step 1, ensure that it is called ‘hosts’ with no file extension.
  8. Perform the above steps on all of your web front ends, changing the IP address in the ‘hosts’ file to the IP address of each server.

Modify the registry of all your Web front end servers.

  1. Go to Start -> Run -> RegEdit
  2. Browse to the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. Create a new Multi-String Value called BackConnectionHostNames
  4. Right click on BackConnectionHostNames and click Modify.
  5. Enter the hostnames of each of your websites, one on each line.
  6. Save your changes.
  7. Restart the IIS Admin Service.
  8. Perform the above steps on all of your web front ends.

Test by opening an InfoPath form that uses the GetUserProfile function, you should no longer receive an error  and the form should populate automatically with user information.

References

http://support.microsoft.com/kb/896861
http://mshorrosh.blogspot.com.au/2012/04/error-publishing-sharepoint-2007-w.html

Comments ( 0 )

Dropdown list options based on permissions in InfoPath

Requirement

Create a dynamic form with fields set to hide/display depending on which option the user chooses in a dropdown box. Some options need to be hidden from certain users.

Solution

  1. Create a Custom List in SharePoint with the drop down values you need. I use Title as the DisplayName and create an additional column called Value to use with the Drop-down List Box control in the form.
  2. Create your InfoPath form with a Drop-down List Box control
  3. Right click on the control -> Drop-Down List Box Properties
  4. Select -> Get choices from an external data source
  5. Set the Display name to ‘Title’ and the Value to ‘Value’.
  6. Now go back to your Custom SharePoint list, right click on the value that you want to hide from certain users -> Manage Permissions
  7. Stop inherting permissions on the item and add your custom permissions.
  8. Publish your form to a form library.
  9. Your Drop-Down List Box should now only show the items which users have access to.

Note:

The hidden drop down item will still show for users who open a form submitted by another person with access to that drop-down list item. They will see the ‘Value’ of the list item. This is where you should use form rules / views to prevent users from being able to view or change forms that are submitted by other users.

Comments ( 0 )