Clear Filter Button

Hello everybody,

im pretty new to CRM administration and i have a question about the sales oportunities.

When I go to Team-CRM and then to sales opportunities I can set filters on the right. Is there a possibility to create/add a button to clear all filters that I selected?

Thank you very much,

Tizian

  • 0

    There is not a simple administrative setting to use. You would need to add a custom button that called script to clear the filters.

  • 0

    Hi Jeff,

    thank you for the answer. Do you think a "crm beginner" would be able to create such a custom button? If yes, is there a tutorial or anything that helps me in this case?

  • 0

    TizianK

    Use the client side API to add a button. The script to do that can be added to the content box of the OpportunitiesList.

    This code will add a simple button.

    crm.ready(function(){

    var buttonimage = '..\\Themes/img/ergonomic/buttons/clear.gif';

    var stringURL = "javascript:crm('oppo_status oppo_stage oppo_secterr').value('');document.EntryForm.submit();"

    var buttonaction = {

    'href': stringURL,

    'index': 1};

    crm.addButton(buttonimage,'button','clear',buttonaction);

    })

    Note: This assumes that the fields in the Opportunity filter box are oppo_status oppo_stage oppo_secterr. Change the fields as needed.

  • 0

    Hello Jeff,

    thank you very much! I added the fields in the code. There is one last thing to do:

    When i press the Button that i created it does switch all filters to the first selection. But the "none-filter" is the last selection in the small list that appears.

    I think I'll have to move the "none" to the top of the list. Sadly I dont know how to do this.

    Would you mind explaining that to me?

  • 0

    Never mind, I fixed it myself. Just had to put the name "-Kein(e)-" in the value ('') field. :-)

  • 0

    Im sorry, I just found out I have another problem. I wanted to make the button switch every selection to "--Alle--" but it doesnt work. It still sets everything to the values ('') instead of ('--Alle--'). Any Ideas?

  • 0

    I still wasn't able to fix the problem. Anyone knows what I'm doing wrong?

    The codes looks like this at the moment:

    crm.ready(function(){

    var buttonimage = '..\\Themes/img/ergonomic/buttons/clear.gif';

    var stringURL = "javascript:crm('oppo_status oppo_stage oppo_secterr oppo_type oppo_wunschtermin oppo_priority oppo_description oppo_product oppo_certainity oppo_source oppo_channelid oppo_som_inherent').value('--Alle--');document.EntryForm.submit();"

    var buttonaction = {

    'href': stringURL,

    'index': 1};

    crm.addButton(buttonimage,'button','clear',buttonaction);

    })

    It sets everything to ('') instead of ('--Alle--'). When I use other words from the list like ('-Kein(e)'), it sets everything to "Kein(e)". But "Alle" simply doesnt work...

  • 0

    Hi, TizianK. Were you able to figure out what was wrong with the code?