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
Nishad BashaNishad Basha 

how to write class for employee details using batch apex in salesforce?

my requirement is display the employee Name,designation,salaryscale, increment,grade using Batch apex how to solve the above scenario please give some ideas
pconpcon
I'm a little confused as to what you mean by "display" in the context of Batch Apex.  Batch Apex is an asychronous event that happens outside of the view of a user.  If you want to take data with Batch Apex and then store that on a new object that can be displayed that's another issue.  What exactly are you try to accomplish?
Nishad BashaNishad Basha

pcon

no need display just run the batch apex.give the example of above scenario.
pconpcon
You would use Batch Apex like normal [1] and when defining the scope of you query you'll just add the fields you mention above to your SOQL query.

[1] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm