• max alexander
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
HI,
Ihave following VF page
<apex:page standardController="account" extensions="searchform">  
  <apex:form >  
 <apex:inputText value="{!searchstring}" label="Input"/>   
  <apex:commandButton value="Search records" action="{!search}"/>  
  <apex:commandButton value="Clear records" action="{!search}"/>  
   <apex:pageBlock title="Search Result">  
    <apex:pageblockTable value="{!acc}" var="a">  

     <apex:column >  
      <apex:outputlink value="https://cochlear--guest1.cs8.my.salesforce.com/{!a.id}">{!a.Name}</apex:outputlink>  
    
     </apex:column>  
      
      <apex:column value="{!a.personEmail}"/> 
       <apex:column value="{!a.phone}"/> 
       <apex:column value="{!a.personMobilephone}"/>
     
        
       
       
  
    </apex:pageBlockTable>  

       
   </apex:pageBlock>   
  </apex:form>  

 </apex:page>
basically it does searches when i open the page, however what i like to include is another button on it that when clicked will let me create custom object
Person__c where it will have only first name, last name and Email address how can i do this?
my controller is
public with sharing class searchform {  
   public list <account> acc {get;set;}  
   public list <Install_Base__c> ib {get;set;}  
   public string searchstring {get;set;}  
   public searchform(ApexPages.StandardController controller) {  
   }  
   public void search(){  
     string searchquery='select name,phone,personEmail,PersonMobilePhone,Latest_Fitting_Date__c from account where name like \'%'+searchstring+'%\' Limit 20';  
     acc= Database.query(searchquery);  
   }  
   public void clear(){  
   acc.clear();  
   }  
  

 }

how is it possible, also
is there  a way to display on that page most recent Person Added to that account? 
any code would be greatly appreciated
HI,
Ihave following VF page
<apex:page standardController="account" extensions="searchform">  
  <apex:form >  
 <apex:inputText value="{!searchstring}" label="Input"/>   
  <apex:commandButton value="Search records" action="{!search}"/>  
  <apex:commandButton value="Clear records" action="{!search}"/>  
   <apex:pageBlock title="Search Result">  
    <apex:pageblockTable value="{!acc}" var="a">  

     <apex:column >  
      <apex:outputlink value="https://cochlear--guest1.cs8.my.salesforce.com/{!a.id}">{!a.Name}</apex:outputlink>  
    
     </apex:column>  
      
      <apex:column value="{!a.personEmail}"/> 
       <apex:column value="{!a.phone}"/> 
       <apex:column value="{!a.personMobilephone}"/>
     
        
       
       
  
    </apex:pageBlockTable>  

       
   </apex:pageBlock>   
  </apex:form>  

 </apex:page>
basically it does searches when i open the page, however what i like to include is another button on it that when clicked will let me create custom object
Person__c where it will have only first name, last name and Email address how can i do this?
my controller is
public with sharing class searchform {  
   public list <account> acc {get;set;}  
   public list <Install_Base__c> ib {get;set;}  
   public string searchstring {get;set;}  
   public searchform(ApexPages.StandardController controller) {  
   }  
   public void search(){  
     string searchquery='select name,phone,personEmail,PersonMobilePhone,Latest_Fitting_Date__c from account where name like \'%'+searchstring+'%\' Limit 20';  
     acc= Database.query(searchquery);  
   }  
   public void clear(){  
   acc.clear();  
   }  
  

 }

how is it possible, also
is there  a way to display on that page most recent Person Added to that account? 
any code would be greatly appreciated