4

I want the same functionality as the search results in Salesforce, but I want this available in a Sites Visualforce page.

Default search results functionality

The closest I've gotten is the apex:enhancedList, but the options available are very limited; I can't filter the results on anything other than the first letter of the name of the record. I would be OK without the search box function if the enhancedList had the "Show Filters" option, and I could click on a result record to view a detail page view.

Limited enhancedList functionality

What would be my best approach?

Thanks.

1 Answer 1

4

How far are you willing to go?

The underlying functionality of the global search is SOSL. If you were willing to compromise on a few features, it wouldn't even be terribly difficult to build, if someone felt confident with Apex and Visualforce. There would be limits as to which objects you could surface in sites depending on if it was authenticated or not.

What you would need is: 1. Get to know SOSL 2. Understand how to create a Visualforce page, especially how to manage partial page refreshes 3. Get to know custom controllers

You would definitely also want a good understanding of VF View State management, since, depending on how much stuff you'll search for, your page view state size could get on the big side.

2
  • I currently have a page working with all the functionality I want, but it's pretty hefty since it includes pagination, jquery auto-populate search box, a very dynamic/complex function in apex to handle all the search filtering, etc... I'm hoping to replace my current page for a much simpler, more elegant solution with minimal custom components in hopes to increase maintainability. Basically it would be great if the enhancedList was more of a "man". =) Thanks Peter.
    – fourq
    Commented Aug 19, 2013 at 22:55
  • Until someone adds a coarse metadata component for the global search, I'm afraid "hefty" is probably as good as it gets.
    – pchittum
    Commented Aug 19, 2013 at 23:34

You must log in to answer this question.

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