"Execute a SmartObject (stored procedure) method (List)" on the View executes stored procedure twice

  • 16 February 2021
  • 0 replies

Userlevel 4
Badge +16


"Execute a SmartObject (stored procedure) method (List)" on the View executes stored procedure twice

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.


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.


"Execute a SmartObject (stored procedure) method (List)" rule on the View, executes the stored procedure twice.

This could lead to slowness if the method is used for basic data selection; or to duplicate rows being inserted into the table if it is being used for adding rows with data.


SQL server service instance based SmartObjects for Stored Procedures default List method is being executed twice when called from SmartForms after the upgrade to 4.7. This happens only if the RowCount setting in runtime web.config is enabled.


Applying August CU + FP14 does not solve this. The same SmartObject method called from the SmartObjects Services Tester Tool executes the stored procedure only once, i.e. issue occurs only when the method is called from form/view and only when RowCount option is enabled (more details about this setting can be found K2 Five Developers Reference).

In 4.6.11 there was no such behavior. This introduces issues when duplicate rows are being inserted when the stored procedure is used to add rows. It may also cause general slowness when simple List methods is used from forms - double execution delay becomes very noticeable for large data sets and complex filters.


This issue has been resolved in the K2 4.7 November 2017 Cumulative Update which can be downloaded from K2 portal.

0 replies

Be the first to reply!