Remove 'View Change Log' from a Detail or EditView

sugarcrmdevelopers —  November 14, 2012 — 6 Comments

Someone asked a great question on the forums the other day; how do I remove the the ‘View Change Log’ button from my Detail or Edit View?

The display of this button is triggered by the whether or not auditing is enabled for the module as a whole. As such, you could simply disable this by adding this bit to a new .php file in the customExtensionmodules<module name>ExtVardefs directory…

But let’s say you want auditing still to occur, but just need the button hidden on one of the views. In this case, simply setting the ‘hideAudit’ displayParam to false is the solution. You can add this to either the editviewdefs.php or detailviewdefs.php files for the module.

6 responses to Remove 'View Change Log' from a Detail or EditView


    Hi, How would i make it so only certain roles can view the change logs?


      The easiest way is to set the Smarty variable ‘$isAuditEnabled’ to false depending upon the role. You can adjust this by extending the view object and adding an override to the display() method to handle this.


    Hi John sir,

    Anes here the same person who ask this question you answer !! . But strange for me this trick not Work
    for me in “Opportunities” module But work in “Cases” module . Is any relevent change there ?

    reply me ASAP


Trackbacks and Pingbacks:

  1. SugarCRM Developer Blog » Blog Archive » Using role controls on DetailView and EditView custom buttons - November 29, 2012

    […] had a good question come up on an earlier blog post on how to control the display of buttons on DetailViews and EditViews. Out of the box the buttons […]

  2. restricting View Change Log for a particular role - December 17, 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