• tola2278
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies

Is it possible to write two action methods in single controller in salesforce

I need to write a batch  which should delete data from object.If there is any example please share thanks 

I wrote this Visual force page to get values from user but its not working if any one can help in this regards

 

<apex:page controller="MyController">

<apex:form >

<apex:PageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!del}" value="Delete"/>

</apex:pageBlockButtons>
<apex:PageBlockSection >
<b>From</b>
<apex:inputText value="{!startdate}"/><br/>
<b>To</b>
<apex:inputText value="{!enddate}"/><br/>

</apex:PageBlockSection>
</apex:PageBlock>
</apex:form>
</apex:page>

 

 

Hi,

 

Basically i have a task to create a batch which works if User select Startdate and enddate of data to be deleted please guide me how can i start