AnsweredAssumed Answered

How to hide panel field from listview in Historical Summary via code

Question asked by Autchara Chaiprom on Nov 28, 2017
Latest reply on Nov 28, 2017 by Autchara Chaiprom

Hi,

 

How to hide/remove field Sale Stage from a list in configuration that user can click to show/hide in Historical Summary via code ?

 

 

 

my code in custom/clients/base/views/history-summary/history-summary.php

$viewdefs['base']['view']['history-summary'] = array(
    'template' => 'flex-list',
    'sticky_resizable_columns' => true,
    'config' => array(
        'limit' => '10',
    ),
    'rowactions' => array(
        'actions' => array(
            array(
                'type' => 'preview-button',
                'css_class' => 'btn',
                'tooltip' => 'LBL_PREVIEW',
                'event' => 'list:preview:fire',
                'icon' => 'fa-eye',
                'acl_action' => 'view'
            ),
        ),
    ),
    'panels' => array(
        array(
            'fields' => array(
                array(
                    'name' => 'picture',
                    'type' => 'avatar',
                    'align' => 'center',
                    'label' => 'LBL_MODULE_TYPE',
                    'dismiss_label' => true,
                    'readonly' => true,
                    'enabled' => true,
                    'default' => true,
                    'isSortable' => true,
                    'width' => 'xsmall',
                ),
                array(
                    'name' => 'name',
                    'label' => 'LBL_SUBJECT',
                    'type' => 'name',
                    'enabled' => true,
                    'default' => true,
                    'link' => true,
                    'isSortable' => true,
                    'width' => 'large',
                ),
                array(
                    'name' => 'status',
                    'label' => 'LBL_STATUS',
                    'type' => 'status',
                    'enabled' => true,
                    'default' => true
                ),
                array(
                    'name' => 'description',
                    'type' => 'textarea',
                    'label' => 'LBL_DESCRIPTION',
                    'enabled' => true,
                    'default' => true,
                    'width' => 'xlarge'
                ),
                array(
                    'name' => 'date_modified',
                    'label' => 'LBL_DATE_MODIFIED',
                    'type' => 'datetimecombo',
                    'enabled' => true,
                    'default' => true,
                    'isSortable' => true,
                ),
                array (
                    'name' => 'assigned_user_name',
                    'label' => 'LBL_LIST_ASSIGNED_USER',
                    'id_name' => 'assigned_user_id',
                    'link' => 'assigned_user_link',
                    'module' => 'Users',
                    'rname'=> 'full_name',
                    'type' => 'relate',
                    'isSortable' => false,
                    'enabled' => true,
                    'default' => true,
                ),
                array(
                    'name' => 'sales_stage',
                    'label' => 'Sales Stage',
                    'type' => 'textarea',
                    'module' => 'Opportunities',
                    'enabled' => false,
                    'default' => false,
                    'isSortable' => false,
                ),
...

 

SugarPro 7.9.1.0

Thanks,

M

Outcomes