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