How to fix the following error: “This InfoPath document contains K2 functionality that was created by a previous version of K2.net and could not be upgraded properly.”

  • 16 February 2021
  • 0 replies
  • 30 views

Userlevel 3
Badge +8
 

How to fix the following error: “This InfoPath document contains K2 functionality that was created by a previous version of K2.net and could not be upgraded properly.”

KB000081

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

When an InfoPath document that was used by older versions of K2.net 2003, (prior to SP1a), is refreshed or used again in the newer versions of K2.net 2003, (SP1a and later), an error is displayed when the K2 InfoPath process wizard tries to upgrade the file after the user has made changes to certain sections in the JavaScript for the InfoPath document. The error displayed is “This InfoPath document contains K2 functionality that was created by a previous version of K2.net and could not be upgraded.

 

When an InfoPath document that was used with older versions of K2.net 2003, (prior to SP1a), is refreshed or used again in the newer versions of K2.net 2003, (SP1a and later), an error is displayed when the K2 InfoPath process wizard tries to upgrade the file after the user has made changes to certain sections in the JavaScript for the InfoPath document.

The error displayed is: “This InfoPath document contains K2 functionality that was created by a previous version of K2.net and could not be upgraded properly. This is caused by changes made to sections in the Script Files that have changed in this version of K2.net. Unexpected results may occur.”

This error happens because K2.net Studio tries to update certain sections in the script file of the InfoPath document, but discovers that changes have already been made to these sections by the user and therefore cannot change it.

To repair the error, proceed with the following steps:
Important: Remember to save the JavaScript somewhere before proceeding in order to make similar changes to the newly updated script afterwards. These steps will replace the changes made to the JavaScript with the original code and then upgrade the document.
 

 

1)   Open the InfoPath template document in Design mode.
2)   In InfoPath select Tools | Programming | Microsoft Script Editor.
3)   Search for the string: // Get the folio value from the DOM and save. Block all the code from this line to the line where the try block closes at the } character, just before the catch(e) line.
  
4)   Open the file “ScriptUpgrade.xml” located at the following location: “<K2.net 2003 Installation folder>inTempIPResourceFiles”.
5)   Under the “NewScript” tag, (<NewScript>), block all the code from the // Get the folio value from the DOM and save line up until the last line before the closing script tag (</script>), including the } character. Copy this block of text.
  

 

6)   Paste this text over the code that was blocked in the InfoPath template document’s script file (step 3 above).
  

 

7)   Save the script and publish/save the InfoPath template document. The InfoPath document is now ready to be upgraded to the newer version of K2.net 2003.
😎   Upgrade the InfoPath document by right-clicking on the process and selecting “Properties”. In the “Process General” section on the “InfoPath Document Actions” drop-down box, select “Update Document Settings”.

 


0 replies

Be the first to reply!

Reply