0

without using the start method to run the batch Apex. how to solve the above scenario please give some ideas.

2
  • No it is not possible
    – Eric
    Commented Jul 9, 2015 at 5:18
  • 1
    What really is your use case? Why would you think of running batch without start method? The more info you give us the easier it would be for us to suggest you a solution
    – Prady
    Commented Jul 9, 2015 at 8:47

3 Answers 3

3

You can not implement a batch without start method. This method is part of "Batchable" interface and mandatory to define. Read following link for Batchable:

To write a batch Apex class, your class must implement the Database.Batchable interface. Your class declaration must include the implements keyword followed by Database.Batchable.

You must also implement three methods:

  • start()
  • execute()
  • finish()
1

The start method returns the items that are broken up into batches and passed into the execute method. So the start has to return at least one item for the Batchable to have much purpose. But because start can return an Iterable, it could say return the numbers 1 to 10 or the letters a to z. The execute doesn't even have to use the values passed in to it.

1
  • using this three methods how to run the batch apex in salesforce
    – salesforce
    Commented Jul 9, 2015 at 9:10
0

Normally the class which implements the interface, should implement/define all the methods available in the interface.

3
  • how to run the batchOpportunityUpdate in batch apex
    – salesforce
    Commented Jul 9, 2015 at 10:21
  • iam getting these error like........................ Error: Compile Error: Variable does not exist: Name at line 13 column 14
    – salesforce
    Commented Jul 9, 2015 at 10:23
  • can you please give me one example
    – salesforce
    Commented Jul 9, 2015 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .