Polymorphic dynamic search with Skuid?

  • 1
  • Question
  • Updated 5 years ago
  • Answered
Not sure if this is a job for Skuid, or something to be coded up with Javascript & Apex, but here goes.

I have a Skuid page called Client View that acts as the Account detail page. It's housed in a Visualforce page that overrides the standard Salesforce Account view page. I also have pages that override Contact and User. All my Skuid pages hide Salesforce's header and sidebar (we're effectively "reskinning" Salesforce) and have a common nav bar that I've created.

The user will often be on the Client View, Contact View or User View page want to easily find and navigate to another account, contact or user. My plan is to have a search box in my nav bar where the user can start typing a string and it returns matching accounts, contacts and users as they type. It's polymorphic like Salesforce's global search, but returns records as you type like a Skuid lookup field. The user selects the name of one of the returned records and clicks to navigate to its detail page.

Wondered if you could point me to the best approach to take.

Thanks as always.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,788 Points 5k badge 2x thumb

Posted 6 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 55,228 Points 50k badge 2x thumb
Hi Glenn,

Searching across multiple objects all at once is the ideal use case for search with SOSL, which Skuid currently doesn't use or support at all via any Skuid API methods. So I'd recommend coding this up yourself right now, using JavaScript Remoting to perform the SOSL search on the Apex side, and jQuery UI Autocomplete or something like that for the front-end UI.

Zach
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,788 Points 5k badge 2x thumb
OK, that makes sense. Good to know. Thanks.
Photo of Emily Davis

Emily Davis, Employee

  • 3,612 Points 3k badge 2x thumb
Your app is beautiful, Glenn! I love to see what you've done with Skuid.
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,788 Points 5k badge 2x thumb
Thanks Emily! When we decided that it had to be beautiful we were wondering just how hard that might be to do, but then along came Skuid to make it a whole lot easier. It's really been great.
Photo of Gary Bailey

Gary Bailey

  • 1,710 Points 1k badge 2x thumb
Glenn, are you available to hire to implement this polymorphic search feature for our SF implementation?

Thanks, Gary
Photo of Glenn Elliott

Glenn Elliott, Champion

  • 7,788 Points 5k badge 2x thumb
Hey Gary ... sorry for the slow reply, I didn't see this earlier. I've just dropped you a note on LinkedIn.
Photo of Zach McElrath

Zach McElrath, Employee

  • 55,228 Points 50k badge 2x thumb
Official Response
FYI for those interested in using SOSL with Skuid --- as of Skuid 6.8.8, Skuid now provides a native JavaScript API that you can use for performing multi-object searches on Salesforce objects using SOSL, and then displaying them in custom UI elements. The method to call is skuid.sfdc.search()--- which is documented here. 
(Edited)
Photo of John De Santiago

John De Santiago

  • 736 Points 500 badge 2x thumb
I am not seeing this method. Is there something I need to enable. I double checked my version (see screenshot).

Photo of Zach McElrath

Zach McElrath, Employee

  • 55,228 Points 50k badge 2x thumb
Oops, there was a misprint in my original post about the version number --- you need to have 6.8.8+, this method is not available in 6.8.7
Photo of John De Santiago

John De Santiago

  • 736 Points 500 badge 2x thumb
Thanks. I will update our version and go from there.