• Chinni reddy
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi sir/Madam,
I wrote Page Reference  in visual force ,then it is not showing any output  what happing.
Know i am sedding apex code and Visual force Code.

public class RamanjiPagination {
    public integer num{get;set;}
    public RamanjiPagination(){
        num=0;      
    }
    public PageReference myMethod(){
        PageReference p=new PageReference('/apex/RamanBasic');
        return p; 
    }
    public void nextMethod(){
        num=num+5;
    }
    public void previous(){
        num=num+5;
    }
    public List<Account>getAcc(){
        Return[Select id,Name,Phone from Account limit 5 offset:num];
    }
}

=================================================
<apex:page controller="RamanjiPagination">
    <apex:form>
        <apex:pageBlock title="Pagination">
            <apex:commandButton value="PageReference" action="{!myMethod}"/><br/>
            <apex:pageBlockTable value="{!acc}" var="a">
                <apex:column value="{!a.id}"/>
                <apex:column value="{!a.Name}"/>
                <apex:column value="{!a.Phone}"/>
            </apex:pageBlockTable>
            <apex:commandButton value="Previous" action="{!Previous}"/>
             <apex:commandButton value="Next" action="{!nextMethod}"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>




 
Hi,

I am executing Batch Apex this type of error showing can you please solve my problem
(Line: 2, Column: 10
Method does not exist or incorrect signature: void executeBatch(BatchApexExample) from the type Database.
this is my code:

global class BatchApexExample implements DataBase.Batchable<sObject>
{
    global String query = 'oppartunaty';
  global DataBase.QueryLocator start(DataBase.BatchableContext bc)
    {
        
        string query='select id,name,amount, Discription from oppartunaty';
        return Database.getQueryLocator(query);
    }
        
     global void execute(DataBase.BatchableContext bc, List<oppartunaty> records){
    
        
        for(oppartunaty  opp: records)
        {
            opp.amount=2000;
            opp.Discription='this my first batch Apex';
                
        }
         update records;
       
        // process each 
    }
    global void finish(Database.BatchableContext bc){
        //procee    
    }
     
}
Hi,

I am executing Batch Apex this type of error showing can you please solve my problem
(Line: 2, Column: 10
Method does not exist or incorrect signature: void executeBatch(BatchApexExample) from the type Database.
this is my code:

global class BatchApexExample implements DataBase.Batchable<sObject>
{
    global String query = 'oppartunaty';
  global DataBase.QueryLocator start(DataBase.BatchableContext bc)
    {
        
        string query='select id,name,amount, Discription from oppartunaty';
        return Database.getQueryLocator(query);
    }
        
     global void execute(DataBase.BatchableContext bc, List<oppartunaty> records){
    
        
        for(oppartunaty  opp: records)
        {
            opp.amount=2000;
            opp.Discription='this my first batch Apex';
                
        }
         update records;
       
        // process each 
    }
    global void finish(Database.BatchableContext bc){
        //procee    
    }
     
}