Salesforce Asynchronous Apex: How to monitor Queueable Apex Job
Looking for Salesforce Training & HandsOn Projects?
You
can refer to my earlier posts on Queueable Job to get a context around this
concept:
- Salesforce Asynchronous Apex:
How to implement Queueable Apex Job
- Salesforce Asynchronous Apex:
How to chain Queueable Apex Job
In this article, we will explore how to monitor the progress of a Queueable Job using Async Job Id returned.
We can start with a simple demo to explain the concept in the following steps:
Step-1: The source of data for this demo will “Contacts” Object as shown below. Using the same records that we modified in the last demo. In this demo, we will be running a delete record operation on the Contacts Object & queue it using the Queueable Job Framework
Step-7: Now queue this
Job using the “System.enqueueJob”
statement but this time we will store the Job Id returned by this function in a
local variable
Step-8: Writing that
local variable in the debug log to refer to it later
We can copy the Job Id & keep it handy somewhere safe
Step-10: To track the job
we can go to Setup Menu Search. Type “Job” & you will get all possible
matches in the list below
Step-11: To get to the
Queueable Job, click on the “Apex Jobs” menu option
Step-13: Use “Ctrl+F” to
run a text search on the browser window, and paste the Job Id that you copied
earlier from debug logs. Search it to see if any record on the page matches
that string
Comments
Post a Comment