AnsweredAssumed Answered

Account record view tabs hidden under an unexpeced chevron dropdown with a random behaviour

Question asked by Artis Plocins on Jul 11, 2017
Latest reply on Jul 14, 2017 by Andre Serrazina

In this screenshot you can see the chevron dropdown. It is expanded, contains hidden tabs and appears under the selected tab physically.

 

This is how it looked when the record was opened for the first time in a new browser. The chevron dropdown contains all tabs except the business card.

 

When one of those tabs was clicked in the dropdown, the whole tab bar changed to what you can see in the first screenshot and does not go back to how it was in the second screenshot.
As you can see in the first screenshot, the current tab is actually one of the hidden ones that was in the dropdown, which I managed to select and it appeared, but the chevron dropdown went under it.
Furthermore, the chevron did not appear instantly with the business card at first, it appeared only after a split second in a new browser.

 

This chevron appears in the Accounts module only when my dependencies extension is installed. This module was finished around 2017-05-08 and was definitely working as intended, no chevron.

 

It might have something to do with the CSS properties for those tabs

 

But that makes no sense since all this customisation does is add two dependencies in the system.

 

This is the installdef in the manifest.php:

'dependencies' => array(
      array(
          'from' => '<basepath>/Accounts/Dependencies/hide_custom_tabs.php',
          'to_module' => 'Accounts',
      ),
  ),

 

And this is the code that's in hide_custom_tabs.php:

<?php

// Hide tab customtab1 when field customtab1_id_c is empty
$dependencies['Accounts']['hide_tab_customtab1'] = array(
    'hooks' => array('all'),
    'trigger' => 'greaterThan(strlen($t1_id_c), 0)',
    'triggerFields' => array('t1_id_c'),
    'onload' => true,
    'actions' => array(
        array(
            'name' => 'SetPanelVisibility',
            'params' => array(
                'target' => 'LBL_RECORDVIEW_PANEL1', // Label name of the custom tab
                'value' => 'true',
            ),
        ),
    ),
    'notActions' => array(
        array(
            'name' => 'SetPanelVisibility',
            'params' => array(
                'target' => 'LBL_RECORDVIEW_PANEL1',
                'value' => 'false',
            ),
        ),
    ),
);

// Hide tab customtab2 when field customtab2_id_c is empty
$dependencies['Accounts']['hide_tab_customtab2'] = array(
    'hooks' => array('all'),
    'trigger' => 'greaterThan(strlen($t2_id_c), 0)',
    'triggerFields' => array('t2_id_c'),
    'onload' => true,
    'actions' => array(
        array(
            'name' => 'SetPanelVisibility',
            'params' => array(
                'target' => 'LBL_RECORDVIEW_PANEL2', // Label name of the custom tab
                'value' => 'true',
            ),
        ),
    ),
    'notActions' => array(
        array(
            'name' => 'SetPanelVisibility',
            'params' => array(
                'target' => 'LBL_RECORDVIEW_PANEL2',
                'value' => 'false',
            ),
        ),
    ),
);

 

Why does this buggy behaviour happen and how can I fix it?

Outcomes