Hide and show dashlet buttons

sugarcrmdevelopers —  November 22, 2012 — Leave a comment

Was checking out this forums post the other day, and thought having a quick guide on how to show and hide the various Dashlet buttons was in order. Here’s the buttons I’m referring to…

While you can’t control the ‘X’ close button, the first two ( Configure and Refresh ) are controlled by the Dashlet::$isConfigurable and Dashlet::$isRefreshable class members, respectfully. While for new Dashlets, simply setting those properties to true or false is a simple way to indicate whether or not to show these buttons, but how can you do that for existing Dashlets?

Sugar PS Engineer and long time community guru Ken Brill chimed in with a pretty elegant solution. Simply copy the class file to the same location in the custom directory, make the change, and then rebuild the Dashlets cache file ( which can be done with a Quick Rebuild and Repair ). Note that this isn’t the most upgrade-safe solution, as you need to sync up any upstream changes to those files back into your base file.

No Comments

Be the first to start the conversation!

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