Let the platform do the work

Health Check Error: Use of App View InvokeParent

Overview

The Health Check wizard must be run when upgrading to evaluate whether your instance is suitable for upgrade. During the health check, various types of issues may be detected which can affect your ability to upgrade. This article will cover the "useOfAppViewInvokeParent" error reported by the health check.

Symptoms

This error generates an output similar to the following in health check:
invokeParentHCError

Resolution

The generated error message will help determine the contents of the file causing the health check error. To address this issue, the code-level customization will need to be corrected or removed before proceeding with the upgrade.

The example error shown above was caused by a problem in the named file, ./custom/modules/Accounts/clients/base/views/active-tasks/active-tasks.js. The example custom code uses a previously deprecated function, app.view.invokeParent, which has been removed in Sugar 7.9 and above. We can see this on lines 100 through 106 of the problematic file:

initialize: function(options) {
  app.view.invokeParent(this, {
    type: 'field',
    name: 'rowaction',
    method: 'initialize',
    args: [options]
  });
  ...
}

In order to proceed with the upgrade, either update or remove the offending line of code or disable the specified file so that it no longer references the removed method. You should use the Component#_super() method instead.

For the example above, app.view.invokeParent should be replaced with Component#_super() as follows:

initialize: function(options) {
  this._super('initialize', [options]);
  ...
}

For more information on extending views, please refer to the Views documentation in the Developer Guide. Once the necessary change has been made, please navigate to Admin > Repair and perform a "Quick Repair and Rebuild". Then, perform the health check again to confirm that the error is no longer reported.