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.
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.