How to customize predefined filters in a Search

I have created a custom module called "Verkaufsangebote".

It has got 2 links to users. Backoffice and Field Rep.

Out of the box I get the following predefined filters:

"My Verkaufsangebote" refers to the Backoffice Rep.

How to add other filters?

How to customize the existing one?

Parents
  • Hi Günter,

    Customizing and adding predefined filters to the list view search must be done at a programmatic level if you wish for the filters to be available for all users. The Sugar Developer Guide covers how to add new filters.

    To customize one of the default filters installed with the module, you would apply the same concept as described in the developer guide to overwrite the existing definition. The standard list view filters found in each module (e.g. My Favorites, My <Module Name>, etc.) are derived from the following file:

    ./include/SugarObjects/templates/basic/clients/base/filters/basic/basic.php

    In that file, locate the filter_definition you want to overwrite and apply the same concept as described in the developer guide link I provided above. Where the guide falls short is providing an example on how to accomplish your scenario of filtering on user-related fields. The solution is also likely going to be different based on how you linked the custom module to users (e.g. custom relationship or a standalone relate field). If you need further help in this regard, let me know as that will take some deeper investigation. 

Reply
  • Hi Günter,

    Customizing and adding predefined filters to the list view search must be done at a programmatic level if you wish for the filters to be available for all users. The Sugar Developer Guide covers how to add new filters.

    To customize one of the default filters installed with the module, you would apply the same concept as described in the developer guide to overwrite the existing definition. The standard list view filters found in each module (e.g. My Favorites, My <Module Name>, etc.) are derived from the following file:

    ./include/SugarObjects/templates/basic/clients/base/filters/basic/basic.php

    In that file, locate the filter_definition you want to overwrite and apply the same concept as described in the developer guide link I provided above. Where the guide falls short is providing an example on how to accomplish your scenario of filtering on user-related fields. The solution is also likely going to be different based on how you linked the custom module to users (e.g. custom relationship or a standalone relate field). If you need further help in this regard, let me know as that will take some deeper investigation. 

Children