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

hi

i want two buttons one standard update

2)controllerextensionupdate

<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>
   <apex:column headerValue="second object">
   <apex:inputField value="{!individualrecords.Description__c}"/>
   </apex:column>
   <apex:column headerValue="third object">
   <apex:inputField value="{!individualrecords.Numbaer__c}"/>
   </apex:column>
   </apex:dataTable>
   <apex:pageBlock >
   <apex:commandButton value="standard update" action="{!standardupdate}"/>
   <apex:commandButton action="{!Controlerextensionupdate}" value="Controlerextensionupdate"/>
   </apex:pageBlock>
    
    </apex:form>
 
</apex:page>

 

 

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

NatrajNatraj

Hi,

 

 

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

NatrajNatraj

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

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_custom_button.htm

 

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;

 

}