Removing the stock ListView actions items for a Sugar 6.5 module

sugarcrmdevelopers —  August 28, 2012 — 5 Comments

If you remember way back when, we had a good blog post here talking about how to extend the ListView actions menu to put in new action items. But what if there are options on the menu by default that you don’t want there? There’s a way to remove these as well.

Each of these options can be triggered off by setting the properties of the ListView object properly. Here’s the action menu items and the properties that control them.

  • Delete – ListViewSmarty::$delete ( also not shown when you don’t have Delete ACL rights on the module )
  • Email – ListViewSmarty::$email
  • Mass Update – ListViewSmarty::$showMassupdateFields ( also not shown when you don’t have the Mass Update ACL right on the module, or no fields exist that allow mass updating
  • Merge – ListViewSmarty::$mailMerge ( for mail merge ) or ListViewSmarty::$mergeduplicates ( for duplicate merge )
  • Add to Target List – ListViewSmarty::$targetlist
  • Export – ListViewSmarty::$export

Now to set these properties, you can easily drop in a custom view.list.php file in the custom/modules/YOURMODULENAME/views/ directory to set these properties. It would look something like this…

This would remove the Export and Delete action items from the menu.

5 responses to Removing the stock ListView actions items for a Sugar 6.5 module


    Some questions:
    1) what if I unset the elements instead of defining them as false?
    2) My customer wants just the “export” action in opportunities, but when I disable all the others, the dropdown should disappear by itself? or should I put in false some of other elements? I’ve tried to disable show_action_dropdown with a result of the whole button disappearing.
    3) I have made a var_dump($this->lv);die; in order to have a big picture of all elements in the object. Is there information of what each of the elements do? In what part of documentation?
    for example, select and multiSelect both make the selection box disappear.


    Just a suggested amendment on the blog as it didn’t work for me when trying to remove the Mass Update option in Sugar 6.5
    It didn’t work with
    $this->lv->showMassUpdateFields = false;

    The property on the blog is slightly different from the ListView class property in Sugar 6.5
    $showMassUpdateFields ( blog )
    $showMassupdateFields ( class property )

    Have now put in as shown below and it works
    $this->lv->showMassupdateFields = false


    want to remove lead detail view action buttons like convert

Trackbacks and Pingbacks:

  1. How to disable Edit button from Dashlet listview in SugarCRM 6.5.5 Pro... - December 12, 2012

    […] […]

Leave a Reply

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

You are commenting using your 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