• Deepak Tiwari 17
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi There can any one help me how to use custom controller for this code as i use Standard controller....below is the code...


<apex:page StandardController="Contact" >
<apex:form >
    <apex:pageBlock >        
<apex:pageBlockButtons Location="Top" >
<apex:commandButton action="{!save}" value="Save&New"/>
    <apex:commandButton action="{!save}" value="Save"/>
    <apex:commandButton action="{!cancel}" value="cancel"/>
     </apex:pageBlockButtons>   
        
    <apex:pageBlockSection title="General Information" columns="2" >
     <apex:inputField value="{!Contact.FirstName}" taborderhint="1"/>
     <apex:inputField value="{!Contact.LastName}" taborderhint="2" required="true"/>
     <apex:inputField value="{!Contact.Email}" taborderhint="3" required="true"/>
     <apex:inputField value="{!Contact.Phone}" taborderhint="4" required="true"/>
     </apex:pageBlockSection> 
        
     <apex:pageBlockSection title="Address Information" columns="2" >
     <apex:inputField value="{!Contact.MailingCountry}" taborderhint="5"/>
     <apex:inputField value="{!Contact.MailingCity}" taborderhint="6"/>
     <apex:inputField value="{!Contact.MailingState}" taborderhint="7"/>
     <apex:inputField value="{!Contact.MailingPostalcode}" taborderhint="8" required="true"/>
     </apex:pageBlockSection>  
     
     <apex:pageBlockSection title="Industry Information" columns="2">
     <apex:inputField value="{!contact.Business_Vertical__c}" required="true"/>
     <apex:inputField value="{!contact.Date_Procured__c}" required="true"/>
     <apex:inputField value="{!contact.Division_of_Vertical__c}" required="true"/>
     <apex:inputField value="{!contact.Area_Of_Division__c}"/>
     
     </apex:pageBlockSection>     
     <apex:pageBlockSection title="Amount Information" Columns="2">
     <apex:inputfield value="{!Contact.Amount_Invested__c}" required="true"/>
     <apex:inputfield value="{!Contact.Amount_Earned__c}" required="true"/>    
     </apex:pageBlockSection>
     
   
                              
<apex:pageBlockButtons Location="Bottom">
<apex:commandButton action="{!save}" value="Save&New"/>
    <apex:commandButton action="{!save}" value="Save"/>
    <apex:commandButton action="{!cancel}" value="cancel"/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
   </apex:form>
</apex:page>
Hi All,

Please help me to sort out this query...error mentioned above

<apex:page standardController="Contact" >
<apex:form >
    <apex:pageBlock >
    <apex:pageBlockSection title="General Information" columns="2" >
     <apex:inputField value="{!Contact.FirstName}"/>
     <apex:inputField value="{!Contact.LastName}"/>
     <apex:inputField value="{!Contact.Email}"/>
     <apex:inputField value="{!Contact.Phone}"/>
     </apex:pageBlockSection>
          
     <apex:pageBlockSection title="Address Information" columns="2" >
     <apex:inputField value="{!Contact.MailingCountry}"/>
     <apex:inputField value="{!Contact.MailingCity}"/>
     <apex:inputField value="{!Contact.MailingState}"/>
     <apex:inputField value="{!Contact.MailingPostalcode}"/>
     </apex:pageBlockSection>  
     
     <apex:pageBlockSection title="Amount Information" columns="2" >
                <apex:inputField value="{!contact.Amount_Invested__c}"/>
                <apex:inputField value="{!contact.Amount_Earned__c}"/>
                 </apex:pageBlockSection> 
                                 
<apex:pageBlockButtons Location="Bottom">
    <apex:commandButton action="{!save}" value="Save"/>
    <apex:commandButton action="{!cancel}" value="cancel"/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
   </apex:form>
</apex:page>
<apex:page standardController = 'Contact' extensions= 'exampleClass1'>
<apex:form >

    <apex:pageBlock >
    <apex:pageBlockSection >
     <apex:inputField value='{!Contact.FirstName}'/>
     <apex:inputField value='{!Contact.LastName}'/>
     </apex:pageBlockSection>

<apex:pageBlockButtons location='bottom'>
    <apex:commandButton action='{!save}' value='Save'/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
   </apex:form>
</apex:page>
 
Hi There can any one help me how to use custom controller for this code as i use Standard controller....below is the code...


<apex:page StandardController="Contact" >
<apex:form >
    <apex:pageBlock >        
<apex:pageBlockButtons Location="Top" >
<apex:commandButton action="{!save}" value="Save&New"/>
    <apex:commandButton action="{!save}" value="Save"/>
    <apex:commandButton action="{!cancel}" value="cancel"/>
     </apex:pageBlockButtons>   
        
    <apex:pageBlockSection title="General Information" columns="2" >
     <apex:inputField value="{!Contact.FirstName}" taborderhint="1"/>
     <apex:inputField value="{!Contact.LastName}" taborderhint="2" required="true"/>
     <apex:inputField value="{!Contact.Email}" taborderhint="3" required="true"/>
     <apex:inputField value="{!Contact.Phone}" taborderhint="4" required="true"/>
     </apex:pageBlockSection> 
        
     <apex:pageBlockSection title="Address Information" columns="2" >
     <apex:inputField value="{!Contact.MailingCountry}" taborderhint="5"/>
     <apex:inputField value="{!Contact.MailingCity}" taborderhint="6"/>
     <apex:inputField value="{!Contact.MailingState}" taborderhint="7"/>
     <apex:inputField value="{!Contact.MailingPostalcode}" taborderhint="8" required="true"/>
     </apex:pageBlockSection>  
     
     <apex:pageBlockSection title="Industry Information" columns="2">
     <apex:inputField value="{!contact.Business_Vertical__c}" required="true"/>
     <apex:inputField value="{!contact.Date_Procured__c}" required="true"/>
     <apex:inputField value="{!contact.Division_of_Vertical__c}" required="true"/>
     <apex:inputField value="{!contact.Area_Of_Division__c}"/>
     
     </apex:pageBlockSection>     
     <apex:pageBlockSection title="Amount Information" Columns="2">
     <apex:inputfield value="{!Contact.Amount_Invested__c}" required="true"/>
     <apex:inputfield value="{!Contact.Amount_Earned__c}" required="true"/>    
     </apex:pageBlockSection>
     
   
                              
<apex:pageBlockButtons Location="Bottom">
<apex:commandButton action="{!save}" value="Save&New"/>
    <apex:commandButton action="{!save}" value="Save"/>
    <apex:commandButton action="{!cancel}" value="cancel"/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
   </apex:form>
</apex:page>
<apex:page standardController = 'Contact' extensions= 'exampleClass1'>
<apex:form >

    <apex:pageBlock >
    <apex:pageBlockSection >
     <apex:inputField value='{!Contact.FirstName}'/>
     <apex:inputField value='{!Contact.LastName}'/>
     </apex:pageBlockSection>

<apex:pageBlockButtons location='bottom'>
    <apex:commandButton action='{!save}' value='Save'/>
     </apex:pageBlockButtons>
    </apex:pageBlock>
   </apex:form>
</apex:page>