How to add custom error messages in a K2.net® 2003 Smartforms project

  • 24 February 2022
  • 0 replies
  • 3 views

Userlevel 3
Badge +8
 

How to add custom error messages in a K2.net® 2003 Smartforms project

KB000078

PRODUCT
K2.net 2003
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.

This article explains how to add custom error handling in a K2.net 2003 Smartforms project. This can be illustrated by capturing the “All Worklist items have been allocated” exception.

 

This error occurs when user ‘B’ selects a Worklist item, (which is still displayed as ‘Available’ in Workspace), after the item has already been allocated to user ‘A’.
 

Cause: User ‘B’s Worklist has not yet been refreshed.

 

Resolution:
Automatically refresh the Workspace of user ‘B’ whenever the error occurs, by doing the following:
1.  Catch the error on the K2.net 2003 ASP.NET Smartform:
 
 
  1.1   Select your client page’s properties
  1.2   Select the event properties for the page
  1.3   Specify an “Error” event
2.  The “Error” event will catch all errors that are raised when the page loads.
3.  Now you can receive each specific error message and specify a way to handle it
 
  
 
4.  If the error message equals “All Worklist items have been allocated”, redirect to a new HTML (“Refresh.htm”) page you added to the project.
5.  On this “Refresh.htm” page, add a function to refresh the user’s Workspace.
 

 


0 replies

Be the first to reply!

Reply