Adding Filter Screen to Company Entity

CRM 6.2.i

I created a new tab with a list to show opportunities that are related to a different company.

community.sagecrm.com/.../24861.aspx

The next hurdle is getting that filter guy to pop up on the right. I found a post for it, but I'm still muddling where to put the code in the list (custom content? at first item in CreateSCript?) and what code to drop in there (because the post has updates for each version of CRM)?

A lot of the examples are just adding a filter screen to the Opportunity or Person Entity, however there is no filterbox for the Company Entity as far as I can see. Do I have to first create a filterbox in the Company > Screens section and then somehow pull it over to my list?

  • 0

    Hi Nick,
    Yes, you are right. You need to create a filter screen in the Company entity. Well, you can also reuse Company Search Box which is already available in the company entity. Once the screen is created, you can refer any example of screen with filter box.
    Hope this information helps!
    Regards,
    Dinesh

  • 0

    I created a new Screen in the company Entity

    But because the Opportunity Filter Box is a system screen I can't see the settings like this to copy them over. I just made it look the same by populating it with a few fields for starters.

    Now I'm not sure what code to plug in (one of those on the page I linked?), or where to put it in (in the CreateScript of the first field? In the Custom Content)?

    If I wanted to use the Company Search Box, what would the code look like, and where would I put it in? The code below placed in the CreateScript or the Custom Content doesn't do anything.

    var FilterBoxBlock = CRM.GetBlock("CompanySearchBox");
    FilterBoxBlock.NewLine = false;
    var ProjectListBlock = CRM.GetBlock("Opportunity Engineering Company");
    var myBlockContainer = CRM.GetBlock("Container");
    with (myBlockContainer)
    {
    AddBlock(ProjectListBlock);
    AddBlock(FilterBoxBlock);
    }
    ProjectListBlock.ArgObj = FilterBoxBlock;