SmartForms web viewer web part - Object Reference error appears

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


When adding the Smartforms Viewer Web Part to a SharePoint site, an Object Reference Not Set to Instance of an Object error appears.


This issue is related to a few Smartforms that were not associated to a Category. When running the Get Forms method if there is not a Category for a Form, a Object Reference error appears.

Troubleshooting Steps

Run the following query to return all objects that do not have a Category associated with them.

SELECT * FROM [Category].[Data]

WHERE NOT EXISTS (SELECT Id FROM [Category].[Category] WHERE Id = CategoryId)

Find all the forms that show up on this query and add these Forms to a category.

1. Create a Category to add these Forms into, via Designer.

2. Make note of the Forms that are output in the Query above.

The next step requires direct Database Manipulation which is not supported without the assistance of a Support Agent. Please contact K2 Technical Support for assistance in resolving the issue.