8

Question in short:

What is the simplest way to add a search box in the related List View (not the related in layout).

Question extended:

I was asked to add a filter/search input in the related list view. That view is the page that appear when you click in the "Go to List(xx)" footer link in any standard relatedList.

For instance, this link :

enter image description here

..has a url like this: salesforce.com/500?rlid=RelatedCaseList&id=001m00000XXXX , which go to the related list view like this:

enter image description here ... where I need to include the search box.

Note: In addition the user don't want to use the header omni-search box.

After google I saw some workarounds that involve to create the relatedList using visualforce. But that seams to involve some mayor impacts:

  1. I should replace the "Go to list" link on the relatedLists. Maybe this is possible using a hack by Javascript
  2. I should rewrite the entire list functionality because I should add a paginator and list N records.

    Any workaround to search in a relatedlist ? Any sample out there?

4 Answers 4

3

Finally I found this free component called: visualforce table grid.

It is really complete and flexible. Also the coding needed is minimal. I only need to create an <apex:detail> and then add the <c:tableGrid> for the relatedList that I want.

<apex:page showHeader="false" sidebar="false"> 
    <apex:form >
        ...
        <c:tableGrid type="Opportunity" 
                     title="Opportunities"
                     fields="Name,StageName,Amount,CloseDate" 
                     sortBy="Name" 
                     image="/img/icon/hands24.png"
                     sortDescending="true"
                     mode="list"
                     customizeFields="true"
                     customizeFilter="true"
                     pageSize="5" />   
         ...
    </apex:form>
</apex:page>

enter image description here

1

This sort of functionality - sort and filter related lists - has always been a noticeable gap for SF. Fortunately Skuid has built out an amazing extension that covers a lot of these. It's a WYSIWYG interface builder that can optionally be extended with javascript.

For your use case, searching a related list, you'd want to look at their table component. It has several options for search and filtering.

Specifically you'll want to:

  1. Create a new Skuid Page
  2. Tie it to a detail page button on the account (or as a case list button)
  3. Add a model for the cases
  4. Add a table component
  5. Add your fields
  6. Add your filters

You're first time this will probably take an hour or so. Which is a lot faster than visualforce pages (which I've built a lot of!)

I'm a consultant and had a client start using Skuid and have since worked to get all our clients using it, as well as our own Salesforce. There is an incremental license cost, but it's very reasonable.

1
  • This is a good answer. I'm going to try Skuid. Thank you Jul 17, 2014 at 6:29
0

This is not possible without writing code. All SFDC functionality are not customization. For ex. web to case can only accept case from web page you can not update case or get the ID of case which you have created.

So to conclude there is no simple way for doing this.

you can write code as you have describe in your question.

2
  • But should I rewrite the entire functionality of the related list? Jul 10, 2014 at 14:34
  • Yes that is the only way. Jul 12, 2014 at 15:32
0

I think what you want to do is not possible without Visualforce. You should not do the hack you propose in the point 1, either, because Salesforce can reject your application due to security issues. The best way I can think of, would consist of:

1- Creating a Visualforce page that shows the records in that list view and includes the search field.

2- Remove the standard related list from the layout.

3- Put your Visualforce page instead of the related list.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .