[SalesForce] When to use queue and future method in salesforce
When to use queue and future method in salesforce?
what is main difference between queue and future method in salesforce?
Best Answer
You can find you answer on This link. I have pasted differences below as well -
Queueable jobs provides following additional benefits -
Queueable jobs are similar to future methods in that they’re both queued for execution, but they provide you with these additional benefits.
Getting an ID for your job: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the new job. This ID corresponds to 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 by starting a second job from a running job. Chaining jobs is useful if you need to do some processing that depends on another process to have run first.
You just need to wrap it with <style> since it is CSS. content allows you to do minimal text manipulation using CSS. All that is saying is "for any spans with the class liveAgentQueuePosition that are empty, insert '0' before them".
That being said, you might want to have it be 1. As an end User, I'm going to be confused or irritated that the screen is telling me there are 0 people in front of me in the Queue but I'm still looking at this screen instead of talking to an Agent.
Despite the apparent combination of options on the Queue's edit page, there are only three options available: notify members of the queue, notify an arbitrary email address, and notify members of the queue and an arbitrary email address. The Send Email to Members checkbox only has an effect when Queue Email is not blank. See How to stop email notification to Queue members?.
So, if you want to completely suppress notifications for a queue, you need to use a non-existent address (try noreply@salesforce.com) and set Send Email to Members to False/Unchecked. Using a non-existent address is also mentioned in the link from above:
Although this is standard functionality, you can put in a "dummy" email address for the Queue email. This way, you can still keep the preference to send an email to the Queue in place, while not automatically sending an email to all Queue members.
Best Answer
You can find you answer on This link. I have pasted differences below as well -
Queueable jobs provides following additional benefits -
Queueable jobs are similar to future methods in that they’re both queued for execution, but they provide you with these additional benefits.
Getting an ID for your job: When you submit your job by invoking the System.enqueueJob method, the method returns the ID of the new job. This ID corresponds to 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 by starting a second job from a running job. Chaining jobs is useful if you need to do some processing that depends on another process to have run first.