Searching Salesforce Records in Visualforce

A use case exists where you’ll need to leverage the ability of searching salesforce records in Visualforce. This example gets an input from the user on the visualforce page. When you click search it passes the query into the function in the controller which uses Database.query().

 

Visualforce:

Apex:

 

Add Comment