Add Filters to Team CRM

Hi All

I used the Entity Wizard to create a custom entity. But does anyone know how to now add in a Filter screen on the right hand to My/Team CRM for that entity? Just as you would see for Cases and Opportunities

  • 0 in reply to Vega

    I just tried to bring that into the current ASP page and the screen is not shown (created a custom filter screen called "Training Course Filter"

  • 0 in reply to Matthew Shaw

    I have used this post in the past...

    https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2009/10/29/building-list-screens-with-filterboxes.aspx#pi10704=2

    There is a really good explaination buried down in the comments.  I have copied it below.  I think I have some script from a previous project where I got this to work.  If you still have issues, I will see if I can dig that out.  Also at the end of the post, you will see that Paul Cowper was able to make it work but had trouble posting the scripts in the post and indicated you can drop him a line if you need it.  :-)

    Hope this helps!

    HI Guys
    I have had some sucess with adding filter boxes in the last couple of days.
    The issue is that using the 'container.AddBlock(FilterBox);' Approach is that CRM Adds it to the container as a screen.
    What you want to do is add Generate the HTML for the filter button Item and then add it to either the Screen or the Container as a Button
    'grab the actual filter box
    var filtscreen = CRM.GETBlock('SoftwareFilterBox');
    'Now grab any buttons that you want to add to the bottom of the filter
    var strFilterButton = eWare.Button("Filter", "filter.gif", "javascript:document.EntryForm.submit();");
    var strAddButton = eWare.Button('New','new.gif',eWare.URL('Software/SoftwareNew.asp'));
    'arrange the filter screen as you see fit
    with (filtscreen)
    {
    ButtonLocation = Bottom;
    ButtonAlignment = Left;
           'IMPORTANT
    Mode=Edit;
    DisplayButton(Button_Default)=false;
    AddButton(strFilterButton+strAddButton);
    }
    'OK now we have all our ducks in a row lets now have a bit of fun. we need to generate our HTML manually
    var strFilter =  filtscreen.Execute();
    var html = "";
    html+= '<table class="ButtonGroup" style="float:right;width:20px;">';
    html+= '<tbody><tr><td class="FilterButtonItem">';
    html+= strFilter;
    html+= '</td></tr></tbody></table>';
    html+= '';
    If you go to one of the Legit Sage CRM Screens that have a filter and browse the HTML using the Dev tools for the browsor that you are using. You will notice the filter and Button are wrapped in the 'ButtonGroup' HTML Class and further in the 'FilterButtonItem' HTML Class
    So now we have wrapped ours in the relevent HTML Now we can add it to the screen
    screen.AddButton(html);
    or
    Container.AddButton(html);
    Although this can be done with the 'container' class i have found that you will get slightly better results if you create a 'Custom' block
    Hope this helps some one
    Ian

  • 0 in reply to Michele Gaw

    Many thanks for this - this is starting to go outside of my comfort zone, I'll get one of my developer guys to have a look. 

    This is a big failing of the Entity Wizard, if told to add lists to My/Team CRM then it should create filter screens automatically for them to keep with the consistency of the other standard entities there. 

  • 0 in reply to Matthew Shaw

    Hi Matthew

    There will be a new version of the Advanced Customization Wizard for Sage CRM 2023 R1.  This is to take into account the ability to file emails against custom entities.  BUT we haven't look at other improvements to the Wizard.  Perhaps we need to get the PAC and other partner meetings to focus on this.

  • 0 in reply to Matthew Shaw

    hi Matthew

    Download a sample asp page with code to create a filter box and button with behaviour similar to the standard CRM screens:

    https://drive.google.com/file/d/1RNfVLA1aSDYjomsRs0deHA5mhXngIzDp/view?usp=share_link

    The code is based on the articles on the Community site + some mods of my own.  It works with the classic as well as the contemporary themes because it was written when the switch over was happening and it had to work with both.

    You will need to replace 'Entity' with the name of your custom entity.

    I would post the code but I just get an error message when I try saying I don't have access to Sage City (!).

    paul

  • 0 in reply to Paul C

    Many thanks, I've downloaded it and will have a play and see what I can achieve :)