• phani_m
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 8
    Replies

Hai............  i am new to salesforce ,

                 I want to know how to write query for the Custom object (applicant__c) having  Expected salary field . now i need to get the values i.e, if the user enter the value 10,000 now i need to get all  the values <= 10.000  of that object.

 

can any one help me

 

 Haii................

   Iam new to slaes force .....

               I need help regarding one issue i.e , I had applicant (custom object)  in that i had Expected salary field .

   Now i need to perform search operation on that field with records having more than 5000 /- sal,or less than 10000/- sal etc that means when the user enters the sal  of 10,000 then i need to display all the records <=10,000  .  How can i do this with making changes in the below code  .

 

 Urgent... please can any one help me ........................................

 

    Here is my Controller code:-

 

 

public with sharing class  SearchapplicantsController {   
    
    private String soql {get;set;}
    // the collection of contacts to display
      Public List<Applicant__c> applicants {get;set;}
    // the current sort direction. deaults to asc
      public String sortDir{
      get { if (sortDir == null) { sortDir = 'asc'; } 
             return sortDir;
             }
             set;
             }
    // the current field to sort by. defaults to last name 
        public String sortField {
          get {
                if  ( sortField == null) {
                sortField = 'Last_Name__c'; } return sortField; }
                set;
                }
      // format the soql for display on the visualforce page 
           public String debugSoql {
              get { return soql + ' order by ' + sortField + ' ' + sortDir + 'limit 20 '; }
               set;
               }
      // init the contrller and display some sample data when the page loads
          public SearchapplicantsController() {
            soql='select First_name__c,Last_name__c,Skill_set__c,Experience__C,Expected_Annual_Salary__c,Location__c,Qualification__c from  Applicant__c  where Candidate__c.First_name__c != null';    
                   runQuery();
                   }
        // toggles the sorting  of query from asc<-->desc
            public void toggleSort() {
              //simply toggle the direction  
                   sortDir = sortDir.equals('asc') ? 'desc' : 'asc' ;
                  // run the query again
                    runQuery();
                    }             
        //runs the actualquery
           public void runQuery() {
              try {
                   applicants = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20 ');
                    }
                    catch (Exception e) {
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, ' OOOps! ') );
                     }
                   }                                
    // runs the search with parameters passed via JavaScript
      public PageReference runSearch(){
      
      
          String FirstName = Apexpages.currentPage().getParameters().get('First_Name__c');
    String LastName = Apexpages.currentPage().getParameters().get('Last_Name__c');
    String Skillset = Apexpages.currentPage().getParameters().get('Skill_set__c');
String Experience = Apexpages.currentPage().getParameters().get('Experience__c');  
String ExpectedSalary = Apexpages.currentPage().getParameters().get('Expected_Annual_Salary__c');
String Location = Apexpages.currentPage().getParameters().get('Location__c');
  String Qualification = Apexpages.currentPage().getParameters().get('Qualification__c');
 
    soql='select First_name__c,Last_name__c,Skill_set__c,Experience__c,Expected_Annual_Salary__c,Location__c,Qualification__c from Applicant__c where Applicant__c.First_name__c != null' ;    

    if (!FirstName.equals(''))
      soql += ' and First_Name__c LIKE \''+String.escapeSingleQuotes(FirstName)+'%\'';
    if (!LastName.equals(''))
      soql += ' and Last_Name__c LIKE \''+String.escapeSingleQuotes(LastName)+'%\'';
    if (!Skillset.equals(''))
      soql += ' and Skill_set__c LIKE \''+String.escapeSingleQuotes(Skillset)+'%\'';  
   if (!Experience.equals(''))
      soql += ' and Experience__c LIKE \''+String.escapeSingleQuotes(Experience)+'%\''; 
   if (!Expectedsalary.equals(''))
      soql += ' and Expected_Annual_Salary__c LIKE \''+String.escapeSingleQuotes(Expectedsalary)+'%\''; 
   if (!Location.equals(''))
      soql += ' and Location__c LIKE \''+String.escapeSingleQuotes(Location)+'%\'';


    if (!Qualification.equals(''))
      soql += ' and Qualification__c LIKE (\''+Qualification+'\')';
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Qualification {
    get {
      
      
      
      if (Qualification == null) {
 
        Qualification = new List<String>();
        Schema.DescribeFieldResult field = Applicant__c.Qualification__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
         Qualification.add(f.getLabel());
 
      }
      return Qualification;          
    }
    set;
  }
 
}

 

  Here is my visualforce code:-

 

<apex:page controller="SearchapplicantsController" sidebar="false">
 <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("First_Name__c").value,
          document.getElementById("Last_Name__c").value,
          document.getElementById("Skill_set__c").value,
          document.getElementById("Experience__c").value,
         document.getElementById("Expected_Annual_Salary__c").value,
document.getElementById("Location__c").value,
          document.getElementById("Qualification__c").options[document.getElementById("Qualification__c").selectedIndex].value
          );
      }
      </script>
 
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock title="Find Me A Candidate!" mode="edit">
 
  <table width="100%" border="0"  >
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
 
       
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="First_Name__c" value="" />
          <apex:param name="Last_Name__c" value="" />
          <apex:param name="Skill_set__c" value="" />
<apex:param name="Experience__c" value="" />
<apex:param name="Expected_Annual_Salary__c" value="" />
<apex:param name="Location__C" value="" />

          <apex:param name="Qualification__c" value="" />
      </apex:actionFunction>
 
      <table cellpadding="4" cellspacing="4">
      <tr>
        <td style="font-weight:bold;">First Name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" id="First_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Last Name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" id="Last_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Skillset   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" id="Skill_set__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Experience &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" id="Experience__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">ExpectedSalary &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="currency" id="Expected_Annual_Salary__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Location &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="text" id="Location__c" onkeyup="doSearch();"/>
        </td>
      </tr>

      <tr>
        <td style="font-weight:bold;">Education &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <select id="Qualification__c" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Qualification }" var="qual">
              <option value="{!qual}"> {!qual}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
 
      </apex:pageBlock>
 
    </td>
        
  </tr>

    </table>
 
    <apex:pageBlock title="SearchResults" mode="edit" id="results">
 
        <apex:pageBlockTable value="{!applicants}" var="applicant">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="First Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="first_name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.First_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Last Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="last_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Last_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Skillset" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Skill_set__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Skill_set__c}"/>
            </apex:column>
      <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Experience" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Experience__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Experience__c}"/>
            </apex:column>
      <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="ExpectedSalary" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Expected_Annual_Salary__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Expected_Annual_Salary__c}"/>
            </apex:column>
      <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Location" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Location__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Location__c}"/>
            </apex:column>


 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Qualification" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Qualification__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Qualification__c}"/>
            </apex:column>
 
        </apex:pageBlockTable>
 
    </apex:pageBlock>
 
    
 
 
 
  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />           
  </apex:pageBlock>    
 
  </apex:pageBlock>
 
  </apex:form>
 
</apex:page>

 

 

 Hai..............

                  I created Dynamic search page with custom object (applicant) having fields firstname,skillset(text datatype), expected annual salary(currency data type)  ,location(text data type) etc.......


 i got the table with all the field values.But the thing is when i enter the values in the input field ,the query is not exectuing can any one help me .............

 

 I think  the values are not passing from javascript to controller...............

Here is my Controller code....

 

public with sharing class SearchapplicantsController {   
    
    private String soql {get;set;}
    // the collection of contacts to display
      Public List<Applicant__c>  applicants {get;set;}
    // the current sort direction. deaults to asc
      public String sortDir{
      get { if (sortDir == null) { sortDir = 'asc'; } 
             return sortDir;
             }
             set;
             }
    // the current field to sort by. defaults to last name 
        public String sortField {
          get {
                if  ( sortField == null) {
                sortField = 'First_Name__c'; } return sortField; }
                set;
                }
      // format the soql for display on the visualforce page 
           public String debugSoql {
              get { return soql + ' order by ' + sortField + ' ' + sortDir + 'limit 20 '; }
               set;
               }
      // init the contrller and display some sample data when the page loads
          public SearchapplicantsController() {
            soql='select First_name__c,Skill_set__c,Experience__c,Qualification__c,Expected_Annual_Salary__c,Location__c from Applicant__c  where Applicant__c.First_name__c != null ';    
                   runQuery();
                   }
        // toggles the sorting  of query from asc<-->desc
            public void toggleSort() {
              //simply toggle the direction  
                   sortDir = sortDir.equals('asc') ? 'desc' : 'asc' ;
                  // run the query again
                    runQuery();
                    }             
        //runs the actualquery
           public void runQuery() {
              try {
                   applicants  = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20 ');
                    }
                    catch (Exception e) {
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, ' OOOps! ') );
                     }
                   }                                
    // runs the search with parameters passed via JavaScript
      public PageReference runSearch(){
      
      
          String FirstName = Apexpages.currentPage().getParameters().get('First_Name__c');
    String Skillset = Apexpages.currentPage().getParameters().get('Skill_set__c');
    String Experience = Apexpages.currentPage().getParameters().get('Experience__c');
    String ExpectedSalary = Apexpages.currentPage().getParameters().get('Expected_Annual_Salary__c');
String Location = Apexpages.currentPage().getParameters().get('Location__c');
String Qualification = Apexpages.currentPage().getParameters().get('Qualification__c');

 
    soql='select First_name__c,Skill_set__c,Experience__c,Qualification__c,Expected_Annual_Salary__c,Location__c from Applicant__c where Applicant__c.First_name__c != null' ;    

    if (!FirstName.equals(''))
      soql += ' and First_Name__c LIKE \''+String.escapeSingleQuotes(FirstName)+'%\'';
    if (!Skillset.equals(''))
      soql += ' and Skill_Set__c LIKE \''+String.escapeSingleQuotes(Skillset)+'%\'';
    if (!Experience.equals(''))
      soql += ' and Experience__c LIKE \''+String.escapeSingleQuotes(Experience)+'%\'';  
    if (!ExpectedSalary.equals(''))
      soql += ' and Expected_Annual_Salary__c LIKE  \''+String.escapeSingleQuotes(Expectedsalary)+'%\' ';
if (!Qualification.equals(''))
      soql += ' and Qualification__c LIKE (\' '+Qualification+'\')';
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Qualification {
    get {
      
      
      
      if (Qualification == null) {
 
        Qualification = new List<String>();
        Schema.DescribeFieldResult field = Applicant__c.Qualification__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
         Qualification.add(f.getLabel());
 
      }
      return Qualification;          
    }
    set;
  }
 
}

 

 

 

 

Here is my visualforce code............

 

<apex:page controller="SearchapplicantsController" sidebar="false">

 <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("First_Name__c").value,
          document.getElementById("Skill_set__c").value,
          document.getElementById("Experience__c").value,
           document.getElementById("Expected_Annual_Salary__c").value,
          document.getElementById("Location__c").value,
          document.getElementById("Qualification__c").options[document.getElementById("Qualification__c").selectedIndex].value
          );
      }
      </script>
 
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock title="Find Me A Candidate!" mode="edit">
 
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
 
       
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="First_name__c" value="" />
          <apex:param name="Skill_set__c" value="" />
          <apex:param name="Experience__c" value="" />
          <apex:param name="Expected_Annual_salary__c" value="" />
          <apex:param name="Location__c" value="" />
          <apex:param name="Qualification__c" value="" />
      </apex:actionFunction>
 
      <table cellpadding="2" cellspacing="2">
      <tr>
        <td style="font-weight:bold;">First Name<br/>
        <input type="text" id="First_name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Skillset<br/>
        <input type="text" id="Skill_set__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Experience<br/>
        <input type="text" id="Experience__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Expected salary<br/>
        <input type="text" id="Expected_Annual_salary__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Location<br/>
        <input type="text" id="Location__c" onkeyup="doSearch();"/>
        </td>
      </tr>

      <tr>
        <td style="font-weight:bold;">Qualification<br/>
          <select id="Qualification__c" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Qualification}" var="qua">
              <option value="{!qua}"> {!qua}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
 
      </apex:pageBlock>
 
    </td>
    <td valign="top">
 
    <apex:pageBlock mode="edit" id="results">
 
        <apex:pageBlockTable value="{!applicants}" var="applicant">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="First Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="first_name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.First_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Skill set" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Skill_set__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Skill_set__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Experience" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Experience__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Experience__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Expected salary" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Expected_Annual_salary__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Expected_Annual_Salary__c}"/>
            </apex:column>
                   <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Location" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Location__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Location__c}"/>
            </apex:column>
  <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Education" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Qualification__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!applicant.Qualification__c}"/>
            </apex:column>
 
        </apex:pageBlockTable>
 
    </apex:pageBlock>
 
    </td>
  </tr>
  </table>
 
  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />           
  </apex:pageBlock>    
 
  </apex:pageBlock>
 
  </apex:form>
 
</apex:page>

 Hai.............

 

              I had one problem regarding Dynamic search....

         I Had one custom object (Candidate) and input fields First Name ,LastName , City, Education  etc.....

On my visual force page, without typing any value in the input text field the values are displaying automatically and when i enter any value in the input field ERROR msg is displaying even the record is present

 

 

MY visualforce code :

<apex:page controller="CandidateSearchController" sidebar="false">
 <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("First_Name__c").value,
          document.getElementById("Last_Name__c").value,
          document.getElementById("City__c").value,
          document.getElementById("Education__c").options[document.getElementById("Education__c").selectedIndex].value
          );
      }
      </script> 
 
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock title="Find Me A Candidate!" mode="edit">
 
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
 
       
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="First_Name__c" value="" />
          <apex:param name="Last_Name__c" value="" />
          <apex:param name="City__c" value="" />
          <apex:param name="Education__c" value="" />
      </apex:actionFunction>
 
      <table cellpadding="2" cellspacing="2">
      <tr>
        <td style="font-weight:bold;">First Name<br/>
        <input type="text" id="First_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Last Name<br/>
        <input type="text" id="Last_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">City<br/>
        <input type="text" id="City__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Education<br/>
          <select id="Education__c" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Education }" var="edc">
              <option value="{!edc}"> {!edc}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
 
      </apex:pageBlock>
 
    </td>
    <td valign="top">
 
    <apex:pageBlock mode="edit" id="results">
 
        <apex:pageBlockTable value="{!candidates}" var="candidate">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="First Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="first_name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!Candidate.First_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Last Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="last_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Last_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="City" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="City__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.City__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Education" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Education__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Education__c}"/>
            </apex:column>
 
        </apex:pageBlockTable> 
 
    </apex:pageBlock> 
 
    </td>
  </tr>
  </table>
 
  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />           
  </apex:pageBlock>    
 
  </apex:pageBlock>
 
  </apex:form>
 
</apex:page>

 

 

 

here is my Controller code;

 

public with sharing class CandidateSearchController {   
    
    private String soql {get;set;}
    // the collection of contacts to display
      Public List<Candidate__c> candidates {get;set;}
    // the current sort direction. deaults to asc
      public String sortDir{
      get { if (sortDir == null) { sortDir = 'asc'; } 
             return sortDir;
             }
             set;
             }
    // the current field to sort by. defaults to last name 
        public String sortField {
          get {
                if  ( sortField == null) {
                sortField = 'Last_Name__c'; } return sortField; }
                set;
                }
      // format the soql for display on the visualforce page 
           public String debugSoql {
              get { return soql + ' order by ' + sortField + ' ' + sortDir + 'limit 20 '; }
               set;
               }
      // init the contrller and display some sample data when the page loads
          public CandidatesearchController() {
            soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candidate__c.First_name__c != null';    
                   runQuery();
                   }
        // toggles the sorting  of query from asc<-->desc
            public void toggleSort() {
              //simply toggle the direction  
                   sortDir = sortDir.equals('asc') ? 'desc' : 'asc' ;
                  // run the query again
                    runQuery();
                    }             
        //runs the actualquery
           public void runQuery() {
              try {
                   candidates = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20 ');
                    }
                    catch (Exception e) {
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, ' OOOps! ') );
                     }
                   }                                
    // runs the search with parameters passed via JavaScript
      public PageReference runSearch(){
      
      
          String FirstName = Apexpages.currentPage().getParameters().get('First_Name__c');
    String LastName = Apexpages.currentPage().getParameters().get('Last_Name__c');
    String City = Apexpages.currentPage().getParameters().get('City__c');
    String Education = Apexpages.currentPage().getParameters().get('Education__c');
 
    soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candiadate__c.First_Name__c != null';    

    if (!FirstName.equals(''))
      soql += ' and First_Name__c LIKE \' '+String.escapeSingleQuotes(FirstName)+'%\'';
    if (!LastName.equals(''))
      soql += ' and Last_Name__c LIKE \''+String.escapeSingleQuotes(LastName)+'%\'';
    if (!City.equals(''))
      soql += ' and City__c LIKE \''+String.escapeSingleQuotes(city)+'%\'';  
    if (!Education.equals(''))
      soql += ' and Education__c LIKE (\''+Education+'\')';
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Education {
    get {
      
      
      
      if (Education == null) {
 
        Education = new List<String>();
        Schema.DescribeFieldResult field = Candidate__c.Education__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
         Education.add(f.getLabel());
 
      }
      return Education;          
    }
    set;
  }
 
}

 

Hai............

           Iam new to salesforce i got a problem in coding....

    I had the Candidate (custom object ) with fields first name, last name, city , education,  ineed to get the  record values from that  object but for me no values are displaying .............. can any one help in code and suggest me . here is my controller and visualforce code...........

 

 

 

public with sharing class CandidateSearchController {   
    
    private String soql {get;set;}
    // the collection of contacts to display
      Public List<Candidate__c> candidates {get;set;}
    // the current sort direction. deaults to asc
      public String sortDir{
      get { if (sortDir == null) { sortDir = 'asc'; } 
             return sortDir;
             }
             set;
             }
    // the current field to sort by. defaults to last name 
        public String sortField {
          get {
                if  ( sortField == null) {
                sortField = 'Last_Name__c'; } return sortField; }
                set;
                }
      // format the soql for display on the visualforce page 
           public String debugSoql {
              get { return soql + 'order by ' + sortField + ' ' + sortDir + 'limit 20 '; }
               set;
               }
      // init the contrller and display some sample data when the page loads
          public CandidatesearchController() {
            soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candidate__c.First_name__c != null';    
                   runQuery();
                   }
        // toggles the sorting  of query from asc<-->desc
            public void toggleSort() {
              //simply toggle the direction  
                   sortDir = sortDir.equals('asc') ? 'desc' : 'asc' ;
                  // run the query again
                    runQuery();
                    }             
        //runs the actualquery
           public void runQuery() {
              try {
                   candidates = Database.query(soql + 'order by ' + sortField + ' ' + sortDir + ' limit 20 ');
                    }
                    catch (Exception e) {
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'OOOps!') );
                     }
                   }                                
    // runs the search with parameters passed via JavaScript
      public PageReference runSearch(){
      
      
          String FirstName = Apexpages.currentPage().getParameters().get('First_Name__c');
    String LastName = Apexpages.currentPage().getParameters().get('Last_Name__c');
    String City = Apexpages.currentPage().getParameters().get('City__c');
    String Education = Apexpages.currentPage().getParameters().get('Education__c');
 
    soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candiadate__c.First_Name__c != null';    

    if (!FirstName.equals(''))
      soql += ' and First_Name__c LIKE \' '+String.escapeSingleQuotes(FirstName)+'%\'';
    if (!LastName.equals(''))
      soql += ' and Last_Name__c LIKE \''+String.escapeSingleQuotes(LastName)+'%\'';
    if (!City.equals(''))
      soql += ' and City__c LIKE \''+String.escapeSingleQuotes(city)+'%\'';  
    if (!Education.equals(''))
      soql += ' and Education__c LIKE (\''+Education+'\')';
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Education {
    get {
      
      
      
      if (Education == null) {
 
        Education = new List<String>();
        Schema.DescribeFieldResult field = Candidate__c.Education__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
         education.add(f.getLabel());
 
      }
      return education;          
    }
    set;
  }
 
}

 

 

apex:page controller="CandidateSearchController" sidebar="false">
 
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock title="Find Me A Candidate!" mode="edit">
 
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
 
      <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("First_Name__c").value,
          document.getElementById("Last_Name__c").value,
          document.getElementById("City__c").value,
          document.getElementById("Education__c").options[document.getElementById("Education__c").selectedIndex].value
          );
      }
      </script> 
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="First_Name__c" value="" />
          <apex:param name="Last_Name__c" value="" />
          <apex:param name="City__c" value="" />
          <apex:param name="Education__c" value="" />
      </apex:actionFunction>
 
      <table cellpadding="2" cellspacing="2">
      <tr>
        <td style="font-weight:bold;">First Name<br/>
        <input type="text" id="First_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Last Name<br/>
        <input type="text" id="Last_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">City<br/>
        <input type="text" id="City__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Education<br/>
          <select id="Education__c" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Education}" var="edc">
              <option value="{!edc}">{!edc}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
 
      </apex:pageBlock>
 
    </td>
    <td valign="top">
 
    <apex:pageBlock mode="edit" id="results">
 
        <apex:pageBlockTable value="{!candidates}" var="candidate">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="First Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="first_name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!Candidate.First_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Last Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="last_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Last_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="City" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="City__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.City__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Education" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Education__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Education__c}"/>
            </apex:column>
 
        </apex:pageBlockTable> 
 
    </apex:pageBlock> 
 
    </td>
  </tr>
  </table>
 
  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />           
  </apex:pageBlock>    
 
  </apex:pageBlock>
 
  </apex:form>
 
</apex:page>

 

 

 

 

 

 

 

 Hai every one.....

 

           I am new to sfdc......  I had one visualforce page with the following:-

                                                           ______________

                                        Location  |______________|  

                                                             _____________ 

                               Expected sal      |______________|

 

                                                            ______________

                                      Skill set       |______________|

 

                                                            ______________

                                    Experience   |______________|

 

                                                                             __________
                                                                            |      SEARCH |   

 

                        I had one position object  (custom) . i would like to perform search on  Location(us,uk) and expected sal (less than 2L,3L or >=6L etc) and Skill set(java,.net... etc) Experience(<2yrs,or >3yrs etc....) .

If user enter  any values in visual force page and clicks search button then we need to display the records belonging to his criteria .

But  iam unable to perform search on all Fields ....

i created one query but it is quering only with one field ineed to have with all fields.... can any one help me.....

provide any code snippet...

public with sharing class ItemEditController {

    private ApexPages.StandardController controller {get; set;}
  public List<applicant__c> searchResults {get;set;}
   public List<position__c> searchResult {get;set;}
  public string searchText {get;set;}
   public string searchwith {get;set;}
 
  // standard controller - could also just use custom controller
  public ItemEditController(ApexPages.StandardController controller) { }
 
  // fired when the search button is clicked
  public PageReference search() {
 
String qry = 'select First_Name__C,Last_Name__c, mobile__c,Skill_set__c,Experience__C,Expected_Annual_Salary__C,current_salary__C from applicant__c ' +
      'where First_Name__C LIKE \'%'+searchText+'%\' ';
    searchResults = Database.query(qry);
   return null;
    return Page.SearchApplicants;
  }
 
  // fired when the save records button is clicked
  public PageReference save() {
 
    try {
      update searchResults;
    } Catch (DMLException e) {
      ApexPages.addMessages(e);
      return null;
    }
 
    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));
  }
 
  // takes user back to main record
  public PageReference cancel() {
    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));
  }

 

  Hai............. Iam new to salesforce 

 

 

                           I need to get the login and logout details of each user in our organistion i.e (professional edition) and i need to get the logged in (hours) of each user. 

 

  How can i ger those things whether i need to write Apex code or is there any better way  to get those results. 

 

Any one help me

 

 hai..............

 

 

 i am new to salesforce ....................

  

              1.        In professional edition we can send  emails more than 1000 a day?  -->is there  any solution for this.

 

               2.     Is there any  method or solution to download the bounced emails in excelsheet.

haiii..................

 

 

 i created one visualforce page such that it consists of

 

                                           1,skillset_________                     <-------------by entering values in these fields

                                            2,keywords______________

                                            3,experience__________

                                        _______

                                       |   search  | <----------------By clicking on search  i need to get the records present on the standard object (applicant)... what i need to do .is there any sample code..

 

 

can any one help urgent

 

haiiiii.............

 

         I created one vf page {Search applicants}  in that i need    

InputFields{skill set,experience, expected salary, match()all ()any---->radio buttons}   

                                ________

                                | search    |     <---------- clicking on search records to be displayed.

                                --------------    

 

to get Input fields how could i write the controller code for that fields.

 

 Any one help me.............................                                                     

hi............

 

 how can i remove the bottom footer in visual force page like:-

                         

                              Copyright © 2000-2013 salesforce.com, inc. All rights reserved. | Privacy Statement | Security Statement | Terms of Use | 508 Compliance           

 

is there any code to remove that

 

haiii................

 

i created a POSITIONS vf page with the help of standard platform from object (position) having fieldswith api's names .

 

i had another vf page consisting of   pageblock buttons

                           1.post a job  <-------- by clicking on this i need to open the vf page which i have already     created(positions) vf page.

                           2.manage jobs

                           3.search jobs      

  i need to create any extension controller in apex class..... can any give the help or any other way to meet the criteria.

Haiiiiii.............

 

i created differentobjects(applicant,recruiter,positions)and i created one VISUALFORCE TAB (jobs)--->so that it will open in vfpage----|  in that......

                 |

                 | 

       ______________________________________________________

       |     () applicant ----->|clicking on applicant page should open                 | 

 

       |     () Recruiter ----->|clicking on recruiter page should open                   |

       |                                                                                                                             |        

        -----------------------------------------------------------------------------------------------

 

How can i create radiobuttons and by clicking on that i want to open that{APPLICANT} page ------,recruiter page.......


 i created Applicant page in vf by taking the api names for(fields) which i had created in standard platform

 

Hai...............

                              I created a job object in standard platform we can get jobs tab by clicking on that we get the records stored on that object , now how can i get that all records displaying whole page on to the vf page 

In develpers guide we have only how to access the records of that job(object) but not to get the existing whole list of jobs  page.......

            
Can any one help

HI............. There is jobs tab by

  clicking on that, which is in  the standard page it should open with vf page

how to link that with the vf tagscan any  help me 

                                

       _________________________________________

       |HOme | JOBS_|____|_______|_______|_________|            

                           | 

                           |   clicking on that                 

                      _________________________________ 

                     |   open in new vf page                                       |

                     |                                                                               |

                     |__________________________________|           

 

how can i get all the details of the job object to vf page is there any code

 

 

 

I am creating an recruitment application  My criteria is:-

 

In this for me having applicant ( i created a tab and object for that with some fields).Applicant want to apply for a particular job he needs to search for the job  so the criteria would be the following

 

 

                                                I should have an option SEARCH JOBS  

                                                                                                        ||  

                                                                                                        ||  

                                                                                                        \/ 

                                                                                                               __________

                                                                                               job title: |__________|  {entering values in this}

                                                                                                                __________ 

                                                                                               Location:|__________|  

                                                                                                                   _________

                                                                                               key words:|_________|

                                                                             Match: () All    () Any 

                                                                                   ______               ______        

                                                                                 | Search |            | Cancel |   

                                                                                  ------------             ------------     

                                                                                         || 

                                                                                         ||  clicking on                                                                                   

                                                                                         \/                                                                                                          

                        Job NO       Title     Location      no of positons available   key words  JobDescription               ____

                             01            hr            bang                                  6                     mba                good cmm               |Apply|   <---''|

 

 

for this how many objects i need to create and link them to display the following fields what is the procedure howcan I resolve this ? can any one hellp me.......................

I am creating an recruitment application  My criteria is:-

 

In this for me having applicant ( i created a tab and object for that with some fields).Applicant want to apply for a particular job he needs to search for the job  so the criteria would be the following

 

 

                                                I should have an option SEARCH JOBS  

                                                                                                        ||  

                                                                                                        ||  

                                                                                                        \/ 

                                                                                                               __________

                                                                                               job title: |__________|  

                                                                                                                __________ 

                                                                                               Location:|__________|  

                                                                                                                   _________

                                                                                               key words:|_________|

                                                                             Match: () All    () Any 

                                                                                   ______               ______        

                                                                                 | Search |            | Cancel |   

                                                                                  ------------             ------------     

                                                                                         || 

                                                                                         ||  clicking on                                                                                   

                                                                                         \/                                                                                                          

                        Job NO       Title     Location      no of positons available   key words  JobDescription               ____

                             01            hr            bang                                  6                     mba                good cmm               |Apply|   <---''|

 

 

for this how many objects i need to create and link them to display the following fields what is the procedure howcan I resolve this ? can any one hellp me.......................

 

 

   

I am new to developer force.com ......I Had one problem while developing an Recrutingapplication in developer force.com

         

                                    Requirement is:-

             

                                                                 I need to have a Registration Form and Login page how can I develop those Forms ?

 

haiiiii.............

 

         I created one vf page {Search applicants}  in that i need    

InputFields{skill set,experience, expected salary, match()all ()any---->radio buttons}   

                                ________

                                | search    |     <---------- clicking on search records to be displayed.

                                --------------    

 

to get Input fields how could i write the controller code for that fields.

 

 Any one help me.............................                                                     

Hai............  i am new to salesforce ,

                 I want to know how to write query for the Custom object (applicant__c) having  Expected salary field . now i need to get the values i.e, if the user enter the value 10,000 now i need to get all  the values <= 10.000  of that object.

 

can any one help me

 

Hai............

           Iam new to salesforce i got a problem in coding....

    I had the Candidate (custom object ) with fields first name, last name, city , education,  ineed to get the  record values from that  object but for me no values are displaying .............. can any one help in code and suggest me . here is my controller and visualforce code...........

 

 

 

public with sharing class CandidateSearchController {   
    
    private String soql {get;set;}
    // the collection of contacts to display
      Public List<Candidate__c> candidates {get;set;}
    // the current sort direction. deaults to asc
      public String sortDir{
      get { if (sortDir == null) { sortDir = 'asc'; } 
             return sortDir;
             }
             set;
             }
    // the current field to sort by. defaults to last name 
        public String sortField {
          get {
                if  ( sortField == null) {
                sortField = 'Last_Name__c'; } return sortField; }
                set;
                }
      // format the soql for display on the visualforce page 
           public String debugSoql {
              get { return soql + 'order by ' + sortField + ' ' + sortDir + 'limit 20 '; }
               set;
               }
      // init the contrller and display some sample data when the page loads
          public CandidatesearchController() {
            soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candidate__c.First_name__c != null';    
                   runQuery();
                   }
        // toggles the sorting  of query from asc<-->desc
            public void toggleSort() {
              //simply toggle the direction  
                   sortDir = sortDir.equals('asc') ? 'desc' : 'asc' ;
                  // run the query again
                    runQuery();
                    }             
        //runs the actualquery
           public void runQuery() {
              try {
                   candidates = Database.query(soql + 'order by ' + sortField + ' ' + sortDir + ' limit 20 ');
                    }
                    catch (Exception e) {
                     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'OOOps!') );
                     }
                   }                                
    // runs the search with parameters passed via JavaScript
      public PageReference runSearch(){
      
      
          String FirstName = Apexpages.currentPage().getParameters().get('First_Name__c');
    String LastName = Apexpages.currentPage().getParameters().get('Last_Name__c');
    String City = Apexpages.currentPage().getParameters().get('City__c');
    String Education = Apexpages.currentPage().getParameters().get('Education__c');
 
    soql='select First_name__c,Last_name__c,City__c,Education__c from Candidate__c where Candiadate__c.First_Name__c != null';    

    if (!FirstName.equals(''))
      soql += ' and First_Name__c LIKE \' '+String.escapeSingleQuotes(FirstName)+'%\'';
    if (!LastName.equals(''))
      soql += ' and Last_Name__c LIKE \''+String.escapeSingleQuotes(LastName)+'%\'';
    if (!City.equals(''))
      soql += ' and City__c LIKE \''+String.escapeSingleQuotes(city)+'%\'';  
    if (!Education.equals(''))
      soql += ' and Education__c LIKE (\''+Education+'\')';
 
    // run the query again
    runQuery();
 
    return null;
  }
 
  // use apex describe to build the picklist values
  public List<String> Education {
    get {
      
      
      
      if (Education == null) {
 
        Education = new List<String>();
        Schema.DescribeFieldResult field = Candidate__c.Education__c.getDescribe();
 
        for (Schema.PicklistEntry f : field.getPicklistValues())
         education.add(f.getLabel());
 
      }
      return education;          
    }
    set;
  }
 
}

 

 

apex:page controller="CandidateSearchController" sidebar="false">
 
  <apex:form >
  <apex:pageMessages id="errors" />
 
  <apex:pageBlock title="Find Me A Candidate!" mode="edit">
 
  <table width="100%" border="0">
  <tr>  
    <td width="200" valign="top">
 
      <apex:pageBlock title="Parameters" mode="edit" id="criteria">
 
      <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("First_Name__c").value,
          document.getElementById("Last_Name__c").value,
          document.getElementById("City__c").value,
          document.getElementById("Education__c").options[document.getElementById("Education__c").selectedIndex].value
          );
      }
      </script> 
 
      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="First_Name__c" value="" />
          <apex:param name="Last_Name__c" value="" />
          <apex:param name="City__c" value="" />
          <apex:param name="Education__c" value="" />
      </apex:actionFunction>
 
      <table cellpadding="2" cellspacing="2">
      <tr>
        <td style="font-weight:bold;">First Name<br/>
        <input type="text" id="First_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Last Name<br/>
        <input type="text" id="Last_Name__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">City<br/>
        <input type="text" id="City__c" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">Education<br/>
          <select id="Education__c" onchange="doSearch();">
            <option value=""></option>
            <apex:repeat value="{!Education}" var="edc">
              <option value="{!edc}">{!edc}</option>
            </apex:repeat>
          </select>
        </td>
      </tr>
      </table>
 
      </apex:pageBlock>
 
    </td>
    <td valign="top">
 
    <apex:pageBlock mode="edit" id="results">
 
        <apex:pageBlockTable value="{!candidates}" var="candidate">
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="First Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="first_name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!Candidate.First_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Last Name" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="last_Name__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Last_Name__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="City" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="City__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.City__c}"/>
            </apex:column>
 
            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Education" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="Education__c" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
                <apex:outputField value="{!candidate.Education__c}"/>
            </apex:column>
 
        </apex:pageBlockTable> 
 
    </apex:pageBlock> 
 
    </td>
  </tr>
  </table>
 
  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />           
  </apex:pageBlock>    
 
  </apex:pageBlock>
 
  </apex:form>
 
</apex:page>

 

 

 

 

 

 

 

 Hai every one.....

 

           I am new to sfdc......  I had one visualforce page with the following:-

                                                           ______________

                                        Location  |______________|  

                                                             _____________ 

                               Expected sal      |______________|

 

                                                            ______________

                                      Skill set       |______________|

 

                                                            ______________

                                    Experience   |______________|

 

                                                                             __________
                                                                            |      SEARCH |   

 

                        I had one position object  (custom) . i would like to perform search on  Location(us,uk) and expected sal (less than 2L,3L or >=6L etc) and Skill set(java,.net... etc) Experience(<2yrs,or >3yrs etc....) .

If user enter  any values in visual force page and clicks search button then we need to display the records belonging to his criteria .

But  iam unable to perform search on all Fields ....

i created one query but it is quering only with one field ineed to have with all fields.... can any one help me.....

provide any code snippet...

public with sharing class ItemEditController {

    private ApexPages.StandardController controller {get; set;}
  public List<applicant__c> searchResults {get;set;}
   public List<position__c> searchResult {get;set;}
  public string searchText {get;set;}
   public string searchwith {get;set;}
 
  // standard controller - could also just use custom controller
  public ItemEditController(ApexPages.StandardController controller) { }
 
  // fired when the search button is clicked
  public PageReference search() {
 
String qry = 'select First_Name__C,Last_Name__c, mobile__c,Skill_set__c,Experience__C,Expected_Annual_Salary__C,current_salary__C from applicant__c ' +
      'where First_Name__C LIKE \'%'+searchText+'%\' ';
    searchResults = Database.query(qry);
   return null;
    return Page.SearchApplicants;
  }
 
  // fired when the save records button is clicked
  public PageReference save() {
 
    try {
      update searchResults;
    } Catch (DMLException e) {
      ApexPages.addMessages(e);
      return null;
    }
 
    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));
  }
 
  // takes user back to main record
  public PageReference cancel() {
    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));
  }

 

  Hai............. Iam new to salesforce 

 

 

                           I need to get the login and logout details of each user in our organistion i.e (professional edition) and i need to get the logged in (hours) of each user. 

 

  How can i ger those things whether i need to write Apex code or is there any better way  to get those results. 

 

Any one help me

 

Haiiiiii.............

 

i created differentobjects(applicant,recruiter,positions)and i created one VISUALFORCE TAB (jobs)--->so that it will open in vfpage----|  in that......

                 |

                 | 

       ______________________________________________________

       |     () applicant ----->|clicking on applicant page should open                 | 

 

       |     () Recruiter ----->|clicking on recruiter page should open                   |

       |                                                                                                                             |        

        -----------------------------------------------------------------------------------------------

 

How can i create radiobuttons and by clicking on that i want to open that{APPLICANT} page ------,recruiter page.......


 i created Applicant page in vf by taking the api names for(fields) which i had created in standard platform

 

I am creating an recruitment application  My criteria is:-

 

In this for me having applicant ( i created a tab and object for that with some fields).Applicant want to apply for a particular job he needs to search for the job  so the criteria would be the following

 

 

                                                I should have an option SEARCH JOBS  

                                                                                                        ||  

                                                                                                        ||  

                                                                                                        \/ 

                                                                                                               __________

                                                                                               job title: |__________|  {entering values in this}

                                                                                                                __________ 

                                                                                               Location:|__________|  

                                                                                                                   _________

                                                                                               key words:|_________|

                                                                             Match: () All    () Any 

                                                                                   ______               ______        

                                                                                 | Search |            | Cancel |   

                                                                                  ------------             ------------     

                                                                                         || 

                                                                                         ||  clicking on                                                                                   

                                                                                         \/                                                                                                          

                        Job NO       Title     Location      no of positons available   key words  JobDescription               ____

                             01            hr            bang                                  6                     mba                good cmm               |Apply|   <---''|

 

 

for this how many objects i need to create and link them to display the following fields what is the procedure howcan I resolve this ? can any one hellp me.......................