• Shivam Dash
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi i want to save the record and redirect to another vf page when clcik on save button . i am able to redirect to vf page but its not saving the record . i am posting the code please anyonre help me out what i am missing .

<apex:page standardController="Account" recordSetVar="Accounts" id="thePage" showHeader="true" sidebar="false" extensions="extension1" >
  <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!Accounts}" var="Acc">
                <apex:column value="{!Acc.name}"/>
                  <apex:column headerValue="Account Number">
                    <apex:inputField value="{!Acc.AccountNumber}"/>
                  </apex:column>
                  <apex:column headerValue="Phone">
                    <apex:inputField value="{!Acc.Phone}"/>
                  </apex:column>
            </apex:pageBlockTable> 
              <apex:inlineEditSupport />
          <apex:pageBlockButtons >
              <apex:commandButton value="Next" action="{!Next}" id="saveButton" reRender="none" />
</apex:pageBlockButtons>
      </apex:pageBlock>
  </apex:form> 
</apex:page>


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

public class  extension4 {
private ApexPages.StandardController controller;
    public  extension4 (ApexPages.StandardSetController controller) {
      
    }
   
    public PageReference Next(){
       
        controller.save();
        PageReference reRend = new PageReference('/apex/mypage22');
        return reRend;
    }
}
 
i want to do pagination for account object . and all the records shown in that vf page we can edit and save in the same vf page
Hi i want to save the record and redirect to another vf page when clcik on save button . i am able to redirect to vf page but its not saving the record . i am posting the code please anyonre help me out what i am missing .

<apex:page standardController="Account" recordSetVar="Accounts" id="thePage" showHeader="true" sidebar="false" extensions="extension1" >
  <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!Accounts}" var="Acc">
                <apex:column value="{!Acc.name}"/>
                  <apex:column headerValue="Account Number">
                    <apex:inputField value="{!Acc.AccountNumber}"/>
                  </apex:column>
                  <apex:column headerValue="Phone">
                    <apex:inputField value="{!Acc.Phone}"/>
                  </apex:column>
            </apex:pageBlockTable> 
              <apex:inlineEditSupport />
          <apex:pageBlockButtons >
              <apex:commandButton value="Next" action="{!Next}" id="saveButton" reRender="none" />
</apex:pageBlockButtons>
      </apex:pageBlock>
  </apex:form> 
</apex:page>


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

public class  extension4 {
private ApexPages.StandardController controller;
    public  extension4 (ApexPages.StandardSetController controller) {
      
    }
   
    public PageReference Next(){
       
        controller.save();
        PageReference reRend = new PageReference('/apex/mypage22');
        return reRend;
    }
}
 
i want to do pagination for account object . and all the records shown in that vf page we can edit and save in the same vf page