SugarCRM how to hide edit button from listview

sugarcrm

Solution

You can also do that by code and create a custom list view via a new file in custom/modules/Accounts/views/view.list.php with code near like that:

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

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

class CustomAccountsViewList extends ViewList
{
    public function preDisplay()
    {
        parent::preDisplay();

        # Hide Quick Edit Pencil
        $this->lv->quickViewLinks = false;
    }
}

By this way you have also some additional "option" which you can hide like export button, massupdate form, etc.

Problem

I need to hide edit button from lists in SugarCRM - the small pencil icon in the left part of each item on the list. The reason I need to hide it, because it opens the popup edit form, which has some bugs, and doesn't run some dependencies. Replacing this popup edit view with the normal edit view through JavaScript could be an option too. It should be done in upgrade safe way. Using SugarCRM Pro 6.5.11

Original source