AnsweredAssumed Answered

SetPanelVisibility Sugar Logic action doesn't seem to be working in 7.2

Question asked by Steve Cox on Nov 18, 2014
Latest reply on May 26, 2015 by Steve Cox
I'm using 7.2 pro.

I've created a new panel for accounts in the studio. It shows up in:

custom/modules/Accounts/clients/base/views/record/record.php

as part of the panel array:

  3 => array (
            'newTab' => false,
            'panelDefault' => 'expanded',
            'name' => 'LBL_RECORDVIEW_PANEL1',
            'label' => 'LBL_RECORDVIEW_PANEL1',
            'columns' => 2,
            'labelsOnTop' => 1,
            'placeholders' => 1,
            'fields' => 
                  array (
                     0 => .......

and I've added the dependency rules as per the docs (I believe):


Following the docs in: 

http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.2/40_Sugar_L...

http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.2/40_Sugar_L...

so:


/custom/Extension/modules/Accounts/Ext/Dependencies/remark_panel.php
        'hooks' => array("edit","view"),
        'trigger' => 'true', 
        'triggerFields' => array('mm_accounts_prod_field_c'),
        'onload' => true,
        'actions' => array(
            array(
                'name' => 'SetPanelVisibility',
                'params' => array(
                    'target' => 'LBL_RECORDVIEW_PANEL1',
                    'value' => 'equal($mm_accounts_prod_field_c, "REM")' 
                )
            ),
        ),
        'notActions' => array(),
    );

Done the rebuild etc but doesn't do anything.

I've tried changing the action name to 'SetVisibility' and the target to 'name' and it works as expected - hiding the account name if the mm_accounts_prod_field_c dropdown is set to 'REM'. But for the SetPanelVisibility action, nothing happens.

I've also tried using the array's id ('3') rather than the panels name as the 'target' with no luck.

has anyone got this working on v7, or could it be a bug?

Outcomes