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

Parents
  • 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

Reply
  • 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

Children