Before reading this KB article, see K2 for SharePoint Upgrades (KB001793) for information on how to upgrade K2 for SharePoint as there are differences depending on the version of K2 you currently have and what version you are upgrading to.
This article only applies to versions of K2 for SharePoint prior to K2 4.7.

If the K2 for SharePoint App has been added to a SharePoint site and a newer version of K2 is installed, it is necessary to update the app on each of the SharePoint sites. If you do not update the app the runtime will continue to function, meaning the Worklist, Form Viewer, New/Edit/Display Forms of lists or libraries that had previously used the app's functionality will work. However, you will not be able to add the app to any new lists or libraries and will receive an error until you have updated the app on each site.

How to update the K2 for SharePoint App

  • It is no longer necessary to upload the Full Control version of the app to the App Catalog due to updated permissions in SharePoint, namely Common Consent. This means that you must install the K2 for SharePoint app first using a SharePoint account that has Global (Tenant) Admin permissions, but from that point forward it can be a site owner. K2 for SharePoint 4.6.9 and later are effectively Full Control.
  • To update the K2 for SharePoint App you will need to be the Site Collection Administrator in SharePoint. The System Account cannot be used to upgrade the App.

Planning your update

Previous versions of K2 continue to work with an updated App. This allows you to upgrade different environments at different times, such as Development, QA and Production. This is helpful when all the environments are on the same tenant.
The upgrade sequence is:
    1. Upgrade the first K2 Server to the new version.
    2. Update the K2 App on the app catalog to the new version.
    3. Update the K2 App on the related site collection and re-run the registration wizard.

The other environments can remain on the old K2 version till testing completes. Repeat the steps above for the other environments.

Steps to update the K2 for SharePoint App

There are three steps to updating the K2 for SharePoint app:

  1. In SharePoint 2013 navigate to Site Contents.
  2. Navigate to the K2 for SharePoint App, hover over the App until the 3 ellipsis appear, click on the ellipsis.
    Image
  3. Select the ‘About’ option to be redirected to the Upgrade App Page (Note: It can take a number of hours after upgrading your K2 environment for the K2 App to reflect the upgrade status). There are two versions of the App available: one for SharePoint on-premises which is installed via the App Catalog, and one version for SharePoint Online which is installed from the SharePoint Store.
  4. A new Version of the App will be available, click on the Get It button.
  5. The Trust validation screen will appear, click on Trust It.
  6. The App will be upgraded.
Run through the Registration wizard found on the K2 for SharePoint page under the General section. (Note that you will require Tenant Admin rights to run the Registration wizard)
Image
Regenerate the SmartObjects on existing Lists and Libraries by selecting the Generate SmartObjects option under the New menu on the K2 Application page. This will ensure that any new functionality added in the update is applied to the existing artifacts. For more information, see the Generating SmartObjects from the K2 Application Page topic in the documentation. Your upgrade is now complete and K2 for SharePoint is ready for use.

Troubleshooting

Issue: If the administrator has already upgraded the K2 environment to the latest version, or the registration wizard has not been run after the app has been updated you could get an error similar to the one below:
Image
When you re-run the Registration Wizard from your K2 blackpearl for SharePoint page you will see a message displayed saying that a newer version of the App is available.
Image
Resolution: Update the App by following the instructions above in the How to update the K2 for SharePoint App section.

Issue: When the K2 for SharePoint App is uninstalled and later reinstalled, the K2 App Parts i.e. the K2 Form Viewer App Part and the K2 Worklist App Part are no longer available.

Resolution: When the K2 for SharePoint App is uninstalled from the site, all App Parts such as the K2 Form Viewer App Part and K2 Worklist App Part, are also uninstalled. These App Parts are packaged with the K2 for SharePoint App. When the K2 for SharePoint App is reinstalled, the App Parts must be added manually to all sites where the K2 for SharePoint App was previously uninstalled.