You need to sign in to do that
Don't have an account?

Visualforce search box
I am very new to visualforce and apex, so I hope this is not a dumb question. I am looking for a simple search where I can put a field on a visualforce page and a search box. When the button is hit I want it to lookup leads for the last name using the input in the field. I am just not even sure how to start with this.
<apex:page standardController="Lead" sidebar="false" showHeader="false" extensions="Leadext" tabStyle="Lead">
<apex:form id="formId">
<apex:pageBlock id="pbId">
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:panelGrid columns="25">
<apex:inputText value="{!leadsearch}" id="docStrId"/>
<apex:commandButton value="Search" action="{!search}" rerender="formId" status="statusId">
</apex:commandButton>
Is it possible to place this box within a dashboard as a dynamic filter? I'm thinking a dashboard that returns a few charts based on a lead or company the user wanted to know about. If they wanted to view the charts for leads/contacts that are part of Salesforce.com, Inc., they search for Salesforce, then select it from the results, then the dashboard only displays data for that company.
Thanks