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.
You are unable to change the form for a SmartForms Event in workflow web designer. When you click on the relevant button you receive the following error message:
"Object reference not set to an instance of an object"
Here you have a custom SharePoint library template (*.stp) and the issue happens when you try to appify the library which was created using this custom template. After selecting Generate Forms & Workflow for this library, adding a SmartForm event in Workflow web designer, and adding a SmartForms event on a canvas, you click on the change form button. This is where the error message appears: "Object reference not set to an instance of an object"
You may see this issue on pre-November 2017 4.7 CU environments. The November CU normally resolves this issue.
Another possible scenario is when you have November 2017 4.7 CU or newer and still getting this error. In this case the issue can also be caused by orphaned categories when some of the SharePoint Management SmartObjects are nested under non-existing/orphaned categories. To resolve/verify this you need to verify categories data in K2 database to see if there are any Categories with missing ParentCategories, as this may cause these object reference errors.
Problematic categories are those which have broken references to parent categories that don't exist. Follow this KB Article to verify and resolve this: "Object Reference not set to an instance of an object" error in K2 Studio or K2 for Visual Studio. Essentially what you need to do is to remap orphaned categories to some new/existing parent category.