Queueable interface in salesforce in hindi Asynchronous apex in salesforce PART – 4

HomeOther Content, TechQueueable interface in salesforce in hindi Asynchronous apex in salesforce PART – 4
Queueable interface in salesforce in hindi Asynchronous apex in salesforce PART - 4
Queueable interface in salesforce in hindi Asynchronous apex in salesforce PART – 4
#salesforce #salesforceadmin #salesforcedevelopers #salesforceknowledge #salesforceintegration #trailhead #trailblazer
In this video we will learn about the Queueable Interface in Asynchronous apex in salesforce.

Queueable Apex allows you to submit jobs for asynchronous processing similar to future methods with the following additional benefits:

Non-primitive types: Your Queueable class can contain member variables of non-primitive data types, such as sObjects or custom Apex types. Those objects can be accessed when the job executes.

Monitoring: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the AsyncApexJob record. You can use this ID to identify your job and monitor its progress, either through the Salesforce user interface in the Apex Jobs page, or programmatically by querying your record from AsyncApexJob.

Chaining jobs: You can chain one job to another job by starting a second job from a running job. Chaining jobs is useful if you need to do some sequential processing.

Another reason to use future methods instead of queueable is when your functionality is sometimes executed synchronously, and sometimes asynchronously.

One of the best features of Queueable Apex is job chaining. If you ever need to run jobs sequentially, Queueable Apex could make your life much easier.

To chain a job to another job, submit the second job from the execute() method of your queueable class. You can add only one job from an executing job, which means that only one child job can exist for each parent job.

Queueable Apex is a great new tool but there are a few things to watch out for:

The execution of a queued job counts once against the shared limit for asynchronous Apex method executions.

You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction.

When chaining jobs, you can add only one job from an executing job with System.enqueueJob, which means that only one child job can exist for each parent queueable job. Starting multiple child jobs from the same queueable job is a no-no.

No limit is enforced on the depth of chained jobs, which means that you can chain one job to another job and repeat this process with each new child job to link it to a new child job.

However, for Developer Edition and Trial orgs, the maximum stack depth for chained jobs is 5, which means that you can chain jobs four times and the maximum number of jobs in the chain is 5, including the initial parent queueable job.

#######################################################

Please contact us at [email protected]
The URL for LinkedIn is https://www.linkedin.com/company/sale…
Website: www.salesforcegyaan.com
Facebook: www.facebook.com/salesforceGyaan
Instagram: https://instagram.com/salesforcegyaan

Take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *