[SalesForce] How to edit the search results page in Salesforce

We want to create a custom button/link on the search results page. If we search for an account and there are no search results, there should be a button/link to the create new account page.

How should we approach this problem? Thanks in advance!

Best Answer

I don't think you can do it. You can add buttons to search results page but for the button to appear there has to be at least 1 record found.

The button type would have to be "list view button" and you add it by modifying for example Accounts -> Account Search Layouts -> Search Results.

enter image description here

This would lead to somehow stupid work process of "can't find it or it doesn't find what you want? Good, type something you know that exists just so the button shows up..."


Out of the box there are few options:

  • use the sidebar "Create new" component (requires Accounts tab to be visible)
  • start creating the related thing you want (say Opportunity) and enable quick creation of Account when you click the lookup icon. This is evil because it bypasses validation rules!

You could also build your own "search before create" page I guess - either a real full page or something tiny, suitable to be added as Global Chatter action. You could then call this action from Chatter homepage.

enter image description here

(Delivery is a custom object from Salesforce1 workshop guides)

Related Topic