Questions tagged [queue]

This tag can be used to group all queries related to Queue in Salesforce

Filter by
Sorted by
Tagged with
11
votes
2answers
4k views

What is the best way to check whether lead belongs to Queue or User?

I'm trying to determine in a trigger, whether a lead belongs to a Queue or a User. What is the best way of going about this? I tried the method mentioned in a dev. force discussion: System.debug( ...
3
votes
3answers
4k views

Assigning Users or Role to queue via apex code

Is there any way I can assign a particular user/particular Role to a Queue via Apex code. I am creating that queue via apex code only. So to automate the process I want to assign users/roles ...
11
votes
3answers
15k views

Difference between Database.executeBatch and Queueable Apex

If Apex Flex Queue is enabled in your organization, you can submit up to 100 batch jobs without getting an error. The outcome of Database.executeBatch is as follows: The batch job is placed in the ...
10
votes
2answers
730 views

Guarantee only a single asynchronous job runs at a time

This is a bit of an odd one. We are interacting with an external system that does not support concurrency due to a bug which they are struggling to fix. We perform a HTTP callout, the callout takes ...
8
votes
3answers
16k views

Error "Too many queueable jobs added to the queue: 2"

I've been looking for similar questions, but none of them applies to my scenario, so I'd be grateful if you can explain me why my logic is failing, and what can I do in order to fix it. I want to run ...
1
vote
2answers
584 views

Get ALL queue Users

I am trying to come up with a way to get ALL queue Users (not just the users who have a groupMember record with UserOrGroupId matching theirs) via apex. Queue membership can also be granted via User, ...
2
votes
1answer
118 views

How to monitor not yet started jobs of a Queuable chain

I am wrapping my head around how to use Apex Queuable as a queue and not as a chain. As I understand all the code samples out there, the next job is enqueued after the work of the previous one is done....
1
vote
2answers
1k views

Custom Chat Window Queue Position Conditional Message

I'm using the liveAgent:clientChatQueuePosition tag in a customized chat window to display a visitors place in the queue. When an alert has been sent to the agent, however, the value is null. Does ...
8
votes
1answer
20k views

Assign a case to a queue in Apex (Test class)

I'm sure this must be quite possible, and probably easy. I need to create a test method in which part of the scenario is that for when a Case is assigned to a Queue. I have successfully tested all my ...
2
votes
1answer
49 views

Why does adding a Queueable cause an INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY error?

I have code that inserts a ContentVersion (a File) that is run under a "Customer Community Login" license inside a Community/Experience. That works fine. I now have an optional asynchronous ...
2
votes
1answer
5k views

How to assign new object to a queue using Process Builder, without using the queue ID?

I want to create a Case using Process Builder and the owner of the Case should be a specific queue. However, I don't want to hard-code the Queue ID in the Process, I consider that bad practice. The ...
0
votes
1answer
1k views

Queue owned cases report, show only member queue cases

How can I create a report which only shows cases owned by queues in which the current user is member. eg: Case1, owner: queue1 Case2, owner: queue2 User1 is member of queue1 and queue2, User2 is ...