AnsweredAssumed Answered

extend list view

Question asked by Bart - on Mar 7, 2017

Could somebody please give me a hint. I think I followed procedures as described in the developermanual but for some reason it does not pick up the file:

 

1. created a file c:\www\sugarcrm\custom\modules\BOY_PM_Financial\views\view.list.php with following content

The getbeans and loadrelationship is working because I've used it in another sugar module.

<?php

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('include/MVC/View/views/view.list.php');

class BOY_PM_FinancialViewList extends ViewList {

 

    function BOY_PM_FinancialViewList() {
        parent::ViewList();
    }

 

    function display() {
        echo "extended boypmfinancial view";
        if( $this->bean->load_relationship( 'boy_pm_general_boy_pm_financial_1' ) ) {

 

            $BoyPmGeneralBeans = $this->bean->boy_pm_general_boy_pm_financial_1->getBeans();
            $BoyPmGeneralBean = current($BoyPmGeneralBeans);

 

            $this->ss->assign( 'BOY_PM_GENERAL_PROJECT_NAME', $BoyPmGeneralBean->name );
        }

 

        parent::display();
    }

 

}

 

2 Then I added following line to the file c:\www\sugarcrm\custom\modules\BOY_PM_Financial\clients\base\views\list\list.php

              1 =>
              array (
                'label' => 'LBL_BOY_PM_GENERAL_PROJECT_NAME',
                'customCode' => '{$BOY_PM_GENERAL_PROJECT_NAME}',
              ),

 

Result: the label shows up on the screen, but the view.list.php code never gets called because I cannot see the echo in my web console.

Outcomes