function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
venkatesh yadavvenkatesh yadav 

command buttons


i want two buttons one standard update


<apex:page standardController="ControlerETO__c" recordSetVar="ControlerETO" >
    <apex:form >
   <apex:dataTable value="{!ControlerETO}" var="individualrecords">
   <apex:column headerValue="first object">
   <apex:inputField value="{!individualrecords.Name}"/>
   <apex:column headerValue="second object">
   <apex:inputField value="{!individualrecords.Description__c}"/>
   <apex:column headerValue="third object">
   <apex:inputField value="{!individualrecords.Numbaer__c}"/>
   <apex:pageBlock >
   <apex:commandButton value="standard update" action="{!standardupdate}"/>
   <apex:commandButton action="{!Controlerextensionupdate}" value="Controlerextensionupdate"/>



this my code but its not accepting it showing two errors standard controller nd controller extension how can i get tht two buttons





If you need to use the standard action then use


  <apex:commandButton value="standard update" action="{!save}"/> <!-- Where the save action will be called from the standard controller you are using-->


   <apex:commandButton action="{!Controlerextensionupdate}" value="Controlerextensionupdate"/> <!-- Use your custom update action-->



Hope this is what you need.

venkatesh yadavvenkatesh yadav

yes natraj thats correct but i want write apex class also for controllerextensionupdate how can i write apex class for that am using extension controller

venkatesh yadavvenkatesh yadav

standard object is working but coustom object not working it need apex program how can i write for that apex program


Here is a good example .......


This explains you how to use the record set variables and for your custom update add a new method in the controller like this



public pageReference controllerExtensionUpdate(){


update ControlerETO;

return null;