Plat-Dev-201 practice question 28 of 30

What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface? Choose 2 answers

Full set: 204 questions
Answer options
A: View the Apex Status page
B: View the Apex Jobs page Correct answer
C: Query the AsyncApexJob object Correct answer
D: View the Apex Flex Queue
Correct Answer:
B. View the Apex Jobs page; C. Query the AsyncApexJob object
Explanation

When a class implementing the Queueable interface is enqueued, its execution is tracked as an asynchronous Apex job. A developer can monitor the status of this job in two primary ways. First, by navigating to the "Apex Jobs" page in Salesforce Setup (B), which provides a user interface to view the status and details of all asynchronous jobs. Second, programmatically by querying the AsyncApexJob SObject (C) using SOQL. The System.enqueueJob method returns the ID of the AsyncApexJob record, which can be used to query its status directly.

Why Incorrect

A. The "Apex Status" page is not a standard page in Salesforce Setup. The correct page for monitoring jobs is "Apex Jobs".
D. The "Apex Flex Queue" is a holding area for batch and future jobs that exceed concurrent limits. It is used for monitoring and managing queued jobs, not for tracking the overall status (e.g., Completed, Failed) of all enqueued jobs.

References

1. Apex Developer Guide, "Monitoring Asynchronous Apex". This section explicitly states the two methods: "To monitor the status of your jobs, go to Setup, and in the Quick Find box, enter Apex Jobs... Or, you can programmatically query for the status of your job by performing a SOQL query on AsyncApexJob." (Supports B and C).

2. Apex Developer Guide, "Queueable Apex". The documentation notes that System.enqueueJob "adds the job to the asynchronous execution queue and returns the ID of the job." This returned ID is the AsyncApexJob record ID, which can be used for querying.

Scroll to Top