function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scott0987Scott0987 

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. 

Adil_SFDCAdil_SFDC

<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>

jjvdevjjvdev

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