Error when trying to add a new activity to the history of a connecred object


Implementation of the case:

  1. In the schedule, open an activity with the following fields populated on the "Connected to" detail: [Lead], [Invoice] and [Project/task];
  2. click the link to open the page of the connected object;
  3. open the "History" tab -> "Activities";
  4. add a new activity to the detail.

As a result, you receive a console error with the following message: 

message: Cannot read property 'replaceCls' of null.

The page of the new activity opens, but when you save and close all of the opened pages, you get back to the schedule displayed in a vertical list and see a blank space with inactive action buttons where the activity page should be. 


The openCardInChain method is blocked in ActivitySectionV2 as follows:

openCardInChain: function(config) {
   if (this.isSchedulerDataView() && (config.operation === ConfigurationEnums.CardStateV2.ADD)) {
      var historyStateInfo = this.getHistoryStateInfo();
      if (historyStateInfo.workAreaMode === ConfigurationEnums.WorkAreaMode.COMBINED) {
   return this.callParent(arguments);

This code is available starting from version 7.3.0.


In version 7.7.0 this behavior must be corrected. To quickly correct it in the configuration, replace the ActivitySectionV2  schema and override the openCardInChain method in it as follows:

openCardInChain: function(config) {
   if (config.isLinkClick) {
      return false;
   var historyState = this.sandbox.publish("GetHistoryState");
   var stateObj = config.stateObj || {
            isSeparateMode: config.isSeparateMode || true,
            schemaName: config.schemaName,
            entitySchemaName: config.entitySchemaName,
            operation: config.action || config.operation,
            valuePairs: config.defaultValues,
            isInChain: true
   this.sandbox.publish("PushHistoryState", {
      hash: historyState.hash.historyState,
      silent: config.silent,
      stateObj: stateObj
   var moduleName = config.moduleName || "CardModuleV2";
   var moduleParams = {
      renderTo: config.renderTo || this.renderTo,
      id: config.moduleId,
      keepAlive: (config.keepAlive !== false)
   var instanceConfig = config.instanceConfig;
   if (instanceConfig) {
      this.Ext.apply(moduleParams, {
         instanceConfig: instanceConfig
   this.sandbox.loadModule(moduleName, moduleParams);
   return true;


Like 0



Show all comments