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
PON PRIYADHARSHINI MPON PRIYADHARSHINI M 

How to create reports using jobs

SubratSubrat (Salesforce Developers) 
Hello ,

Do you want to create Reports on Apex Job ?
If so then you can refer this discussion which might help you with your requirement -> https://salesforce.stackexchange.com/questions/219516/reports-on-apex-job-salesforce

Hope the above information helps !
Thank you.
Shuvam PatraShuvam Patra

Creating reports using jobs in Salesforce depends on the kind of job you're referring to. If we are talking about Apex jobs or Batch jobs, there isn't a direct way to create a report from these, as the job data isn't directly reportable. However, you can create a custom object to hold the job results, and create a report based on this custom object.

  1. Create a custom object - The custom object should have fields for all the data you'd like to include in your report. For example, you might include fields for Job Id, Created Date, Status, and any other relevant job data.
  2. Update the custom object - Modify your job to update (or create) records in the custom object. This usually involves adding a few lines of code to your job's execute method, which create or update a custom object record with the relevant job data.
Create a report - Once your custom object is populated with data, you can create a report based on it. In Salesforce, go to the Reports tab, click "New Report", and select your custom object. You can then customize the report as needed to display your job data.