Changing a Sharepoint List Column from a "Choice" to another type causes View and Workflow edit errors

  • 16 February 2021
  • 0 replies
  • 4 views

Userlevel 5
Badge +20
 

Changing a Sharepoint List Column from a "Choice" to another type causes View and Workflow edit errors

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.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

After changing a SharePoint List Column type from "Choice" to something different (i.e. Single Line of Text), the following errors may be encountered when attempting to edit the Workflow associated with the SharePoint List:

 

"Exception of type SourceCode.SmartObjects.Client.SmartObjectException was thrown"

 

 

Image

 

or

 

"SmartObject [Choice] could not be found"

 

 

Image

 

 

Attempting to deploy the workflow will display the same "SmartObject [Choice] could not be found" error and the Workflow will not be deployed. 

 

When attempting to edit a View, an "Object reference not set to an instance of an object" error is displayed.

 

Image

 

 

 

Symptoms

When a SharePoint List containing a Choice Column is Appified with SmartObjects, Forms and a Workflow, an additional SmartObject is created for K2 to retrieve the Choice Options, from the Choice Column.

 

When this Choice Column is changed to a different type (i.e. single line of text), it is required to regenerate the SmartObjects.

 

The Regeneration process deletes the "choice" SmartObject, as no Choice Options are available anymore. This causes reference errors in the previously created Views and Workflows.

 

Based on the K2 4.7 Fix Packs that has already been installed, the following errors will be encountered:

 

K2 4.7 prior to November 2017 Cumulative Update Fix Pack 7: 

- When attempting to edit the Workflow, an "Exception of type SourceCode.SmartObjects.Client.SmartObjectException was thrown" error is displayed.

- When attempting to edit a View, an "Object reference not set to an instance of an object" error is displayed.

 

K2 4.7 November 2017 Cumulative Update Fix Pack 7 up to Fix Pack 13

- When attempting to edit the Workflow, the Workflow will open, but an error will be displayed stating "SmartObject [Choice] could not be found."

- When attempting to edit a View, an "Object reference not set to an instance of an object" error is displayed.

Resolution

The "Object reference not set to an instance of an object" error when attempting to edit a View has been addressed in the K2 November 2017 Cumulative Update Fix Pack 14. 

After deploying the Fix Pack, the View can be edited and the Application Lifecycle Management (ALM) will flag any broken reference on the View. The View can then be edited to resolve the issue. 

To rectify the "SmartObject [Choice] could not be found" error when editing the Workflow, please log a Support Ticket with K2 Support as direct Database manipulation will be required to remove the reference from the Workflow. 

Please reference this article for faster resolution to the issue.


0 replies

Be the first to reply!

Reply