Chapter 22. General Form Issues

This chapter explores various form issues that may arise during your SharePoint form development and suggests possible resolutions. It is suggested to browse through all the troubleshooting chapters to become aware of potential pitfalls.

Resolve: Issue Accessing Data Source

This is one of the most common errors messages to receive, as shown in Figure 22.1, and means a problem exists with the data connection or data source itself.

Figure 22.1. Any issue with a data connection produces this error.

image

You can take several troubleshooting steps, as follows:

  1. Ensure that the data source is available and reachable.
  2. Make sure the data connection file exists in the data connection library.
  3. Make sure the data connection file has been approved in the data connection library. If the status is pending, that could be the issue.
  4. Make sure the permissions on the data sources, lists, libraries, and data connection files are correct.
  5. Review the contents of the data connection file to insure the configuration is correct including any credentials.
  6. Always click Show Details (if presented) to glean more informative debugging ammunition.
  7. Investigate the event log on the server to uncover any other issues.

Resolve: SQL Credential Issue

From Central Administration, follow these steps:

  1. Click the General Application Settings link on the left-side navigation.
  2. Under InfoPath Form Services, click the Configure InfoPath Form Services link.
  3. On the Configure InfoPath Form Service page, check the Allow Embedded SQL Authentication option, as shown in Figure 22.3.

    Figure 22.3. Checking the Allow Embedded SQL Authentication option resolves the exception error.

    image

  4. Click OK.

Resolve: Business Data Connectivity Metadata Store Is Currently Unavailable

Figure 22.4. When the Business Data Connectivity Service is not started, you will receive this message in SharePoint Designer.

image

The Business Data Connectivity Service is probably not started on the server and therefore needs to be started. To do this, follow these steps:

  1. Open SharePoint 2010 Central Administration.
  2. Under System Settings, click the Manage services on server link.
  3. Find the Business Data Connectivity Service line and click the Start link, as shown in Figure 22.5.

Figure 22.5. Clicking the Start link starts the Business Data Connectivity Service.

image

Resolve: Picker Issue Obtaining Business Data

When you use an external item picker on a SharePoint form, the control is configured to connect to the data source through SharePoint. Therefore, when attempting to preview the form, you receive a message in the picker dialog, as shown in Figure 22.6.

Figure 22.6. Previewing an external item picker produces this error when configured to connect through SharePoint.

image

You need to publish the form to SharePoint and test the connection there because the control is configured to connect through SharePoint itself.

Resolve: Modifying a List/Library Page Makes the Ribbon Disappear

The List/Library ribbon is contextual based on the current objects on the page. By default, only the List or Library web part exists and therefore the ribbon appears. When you modify a list or library page, the context is changed, as shown in Figure 22.7.

Figure 22.7. Modifying the page causes the ribbon to disappear.

image

Once the List or Library web part on the page is selected, the ribbon is displayed accordingly, as shown in Figure 22.8.

Figure 22.8. Selecting the List web part on the page produces the List ribbon.

image

Resolve: SharePoint Designer Task List Creation Error

When you are creating a new task, such as a to-do item, SharePoint Designer generates a content type with the name you enter. Therefore, if you attempt to use the same name, a message appears as shown in Figure 22.9.

Figure 22.9. Entering a task name that was already used produces this message.

image

If the original content type is not being used by another workflow or process, remove the content type from your site and attempt to create the task item again. Otherwise, provide a different name for the task.

Resolve: VSTA Required Issue

To produce code within your form, you need to have VSTA installed on your machine. This is not installed automatically during the Office 2010 installation (or InfoPath 2010 installation). You will receive the error shown in Figure 22.10 if you do not have VSTA.

Figure 22.10. Not having VSTA installed produces this message when attempting to create code in your form.

image

To resolve this issue, follow these steps:

  1. Close InfoPath Designer 2010.
  2. Open the Control Panel.
  3. Click Programs and Features.
  4. Select the Microsoft Office 2010 entry and click Change.
  5. Keep Add or Remove Features selected and click Continue.
  6. On the Installation Options dialog, expand Microsoft InfoPath.
  7. Expand .NET Programmability Support under Microsoft InfoPath.
  8. Click the drop-down item menu on the Visual Studio for Applications entry and select Run from My Computer, as shown in Figure 22.11.

    Figure 22.11. Changing the Visual Studio Tools for Applications to Run from My Computer installs the necessary files.

    image

  9. Click Continue. The VSTA is installed.
  10. Open InfoPath Designer 2010 and click Code Editor on the Developer ribbon to ensure that you are able to produce code and event handlers.

Tip

Sometimes just installing VSTA does not resolve the issue, especially on a virtual machine running a Windows Server product. A surefire way to allow VSTA to run is to select the Microsoft Office drop-down menu and select Run All from My Computer.

Resolve: Error Loading the Form

When a form is deployed as a content type either directly or through InfoPath Forms Services but then the form is removed or deactivated from the site collection, the content type still exists.

Because the content type still exists, when you attempt to create a new document using the form content type, SharePoint cannot find the form template. The error shown in Figure 22.12 is produced.

Figure 22.12. Removing a form template from InfoPath Forms Services produces this error when attempting to create a new instance.

image

If the form should no longer be used, make sure you remove the content type from SharePoint so that there is no reference to the deleted form. If the form is still being used, redeploy the form or make sure the form is activated on the site collection.

Resolve: Security Exception Using Code-Behind

When your form needs to execute code and the security setting is not configured, you receive an error message similar to Figure 22.13.

Figure 22.13. Not setting a form’s security to Full Trust produces this security exception.

image

To resolve this issue, follow these steps:

  1. Click File, Info.
  2. Click the Form Options button. The Form Options dialog appears.
  3. Select the Security and Trust category from the list on the left.
  4. Uncheck the Automatically Determine Security Level check box. The security-level options are enabled.
  5. Select the Full Trust option.
  6. Click OK.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.16.23