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:
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.