My Vf Page is

<apex:page standardController="Temporary_contact__c" extensions="tempView" >
 <apex:form >
     <apex:pageblock >    
       <Apex:pageblockButtons >
         <apex:commandButton value="Save" action="{!savetemp}"/>
 <apex:pageblocktable value="{!convalues}" var="con" columns="9">        
            <apex:column headerValue="Sno:">
             <apex:column headerValue="Order Number">
                <apex:outputtext value="{!con.OrderNumber__c}" />
             <apex:column headerValue="First Name">
                 <apex:outputfield value="{!con.First_Name__c}"/>

My class is

public class tempView {
list<Temporary_contact__c> conValues;
public list<Temporary_contact__c> getconValues() {
     conValues = [select id,First_Name__c,Last_Name__c,Email__c,Installment__c,Check_temp__c,Map_Contact__c,OrderNumber__c,Recurring__c from Temporary_contact__c];
       for(integer i=0;i<conValues.size();i++){
            conValues[i].viewContact__c = string.valueOf(i);
        return conValues;
 public tempView(ApexPages.StandardController controller) {
  public void savetemp(){
        system.debug('1111111');// It never shows in debug log   
        //some code here

My Problem here is when I click on save button ,it never calls the debug method.Hope someone is aware of this issue Help pls!!!!

1 Answer 1


Try this

<apex:commandButton value="Save" action="{!savetemp}" immediate="true"/>
public PageReference savetemp(){
        system.debug('1111111');// It never shows in debug log   
        //some code here
         return null;
  • immediate="true" can you explain me when should I add this?
    – Eagerin Sf
    Mar 18, 2013 at 7:44
  • A Boolean value that specifies whether the action associated with this component should happen immediately, without processing any validation rules associated with the fields on the page. If set to true, the action happens immediately and validation rules are skipped. If not specified, this value defaults to false. salesforce.com/us/developer/docs/pages/Content/… Mar 18, 2013 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .