SugarCRM: include javascript file on listview

  • Create a new file on /custom/modules/<ModuleName>/views/view.list.php
  • Copy the code below

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
class {ModuleName}ViewList extends ViewList
{
    function __construct()
    {
        parent::__construct();
    }
    function preDisplay()
    {
        echo '<script type="text/javascript" src="{INCLUDE_FILE_PATH}"></script>';
        parent::preDisplay();
    }
}
?>

Advertisements
SugarCRM: include javascript file on listview

One thought on “SugarCRM: include javascript file on listview

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s