A History Subpanel Filter

sugarcrmdevelopers —  July 5, 2013 — 1 Comment

Editor’s Note: This blog post is authored by Francesca Shiekh and Niklas Lanwehr as a followup to an earlier blog on Subpanel Filters.

In a previous post “Creating a SubPanel Filter” I proposed a sub panel filter which, though generic enough for most subpanels, unfortunately did not work for  the History sub panel.

Niklas Lanwehr, who works for Sugar Customer technotrans AG,  was able to extend that sub panel filter to be useable for the History.

Together, we further extended the concept creating what we share here: A History Subpanel Filter that not only searches by keywords in the ‘name’ field but also restricts the search to a given type of Activity if so chosen:

For the History sub panel we created a new widget:

custom/include/generic/SugarWidgets/SugarWidgetSubPanelTopHistoryFilterInputButton.php

And we modified the  filter_subpanel.php script presented here: http://developers.sugarcrm.com/wordpress/2012/12/06/creating-a-subpanel-filter/

The new file is as follows, with the bold portion being the addition to the original filter:

NOTE that, as with the prior version:

  • This does NOT work with fancy menus (if you can make it work please do let us know how)
  • The “All” option is hardcoded, provisions may need to be made for those using multiple languages.
  • I can’t seem to control the alignment of the input field, dropdown and Filter/ClearFilter buttons, it looks different on each of our instances.

As always, Niklas and I welcome your feedback.

One response to A History Subpanel Filter

  1. 
    Darrel Hayner July 23, 2015 at 1:15 pm

    I just left a comment on the other thread before I saw this one – sorry!
    Is there a way to make the filter settings persist per user?
    Thanks

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