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 questionsWhen 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.
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.
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.
Keep practicing
Take the free Plat-Dev-201 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Plat-Dev-201 practice questions
- Question 1Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightn…
- Question 2Which two statements are true about using the @testSetup annotation in an Apex test class…
- Question 3Managers at Universal Containers want to ensure that only decommissioned containers are a…
- Question 4Universal Containers has a Visualforce page that displays a table of every Container__c b…
- Question 5A developer is alerted to an issue with a custom Apex trigger that is causing records to …
- Question 6Which two operations affect the number of times a trigger can fire? Choose 2 answers
