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( ...
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
731 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 ...
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 ...
8
votes
1answer
5k views

Difference between Queues and Flex Queues

What is the diff between Queues and Flex Queues? Is it related to BatchJobs or Schedule Jobs?
7
votes
3answers
343 views

Reduce the risk of my Queueables to harm other async jobs

I know a specific org can enqueue up to 250,000 async jobs per 24h period in an org. My app uses a few Queueable jobs on nearly every user transaction to send Usage Metrics to another server so this ...
6
votes
1answer
208 views

Queues, Email Notifications, Standard Controller Extensions. Oh My!

Created a controller extension for the standard case controler. we set the OwnerId using custom save logic, but it doesn't seem to matter what i do, Queue Notifications are never sent out to members. ...
5
votes
2answers
1k views

Queueable Execution Time Limitation

I've got a trigger on opportunities (after update) that enqueues a job using a Queueable apex class. What are the limitations I'm going to hit if opportunities are update very frequently? Will ...
5
votes
1answer
656 views

Is it normal to tests not be able to create queues because there's one with the same name on the organization?

If I have, for example, in production a MyQueue queue, with the same DeveloperName, and I'm trying to run a test class to deploy a change set, which contains a test that inserts a MyQueue queue as ...
5
votes
2answers
8k views

Query all the queue a user belong

How can I query all the queues to which a user belongs? Note: Queues also contains public groups, role, role and subordinate and I need to loop through all these to find out if user is associated ...
5
votes
1answer
647 views

API/Apex for modifying Batch Apex Flex Queue

UPDATE: Winter '16 made huge improvements since I wrote this question after Spring '15. Most notably, the various methods on the FlexQueue object (and related methods on Test object) My question as ...
5
votes
0answers
559 views

Push Queue and create its Users in scratch org

I am trying to create a fresh scratch org and push a source to it through a script. The problem comes with Queues (and probably other sources that reference usernames), they are associated with users ...
4
votes
1answer
3k views

How to convert a lead owned by queue?

I am getting an issue: REQUIRED_FIELD_MISSING, Converted objects can only be owned by users. If the lead is not owned by a user, you must specify a user for the Owner field.: [OwnerId] while ...
4
votes
1answer
2k views

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?
4
votes
2answers
295 views

Is there a way to restrict users in a queue

I am looking for a way to control how many users are allowed in a queue. I have not seen any documentation or posts regarding this subject. Is this even possible??. Can there be a trigger fired when ...
3
votes
3answers
5k views

Flow Builder - Dynamically Get Queue Id by Name

I am using flow builder to create cases and assign them to specific queues based on criteria within the flow. In the Assignment element, I can set OwnerId to a hard coded id string or a resource. ...
3
votes
1answer
733 views

Unit Testing seeing all Queues in the Org

I need to fetch a List of all Queues in the org which allow Leads. To do this I created a function which does its job well. Now in Unit Testing, the problem I am facing is that the unit Tests see all ...
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 ...
3
votes
2answers
381 views

salesforce find number of users in all queues

Is there a way to find the number of users in each queue in Salesforce Org? Context: We have 5000 queues in our system. We believe most of them are empty or assigned with very less number of users. ...
3
votes
1answer
1k views

How do I assign task to Case Owners without breaking on a queue owned case?

Currently I have a process builder flow that is built to assign a task to the case owner when a case comment is added by someone other than the case owner. 90% of the time this works great, but when ...
3
votes
1answer
192 views

Issues with Batch Queuing?

Has anyone else run into issues where their concurrent batches don't really run concurrently? Supposedly there is a limit of 5 and beyond that goes to the Flex Queue, but I consistently only have a ...
3
votes
1answer
2k views

Assign Case to queue without using assignment rules or apex

We are using Flow to create cases, we need to assign these cases to different queues. Since FLows do no trigger Assignment rules, what other functionality can I use to make this happen without having ...
3
votes
1answer
26 views

Accounting for external request failures

I've got a trigger that invokes a call to a external service, passing along opportunity data, via a queueable apex class. Most of the time this call would pass, but say my external system goes down, ...
3
votes
1answer
732 views

Cannot set Assigned Approver as ‘Queue:Queue_Name’ in Approval Steps of Approval Process using Metadata API

If the queue does not contains parent Object as supported Object but doesnot contains childObject as supported Object user can set Queue as approver for a approval process created on child Object. But ...
2
votes
2answers
2k views

Query queues belonging to a particular sobject

Is there a way to query only queues tied to a particular sobject? I have the following query which gets me all the queues. Select id, name from group where Type = 'Queue' I want all queues which ...
2
votes
2answers
4k views

How to determine if case owner is queue with specific developer name

I have a problem with selecting specific custom queue in apex code. For example I have: Case c = (Case) controller.getRecord(); String queueName = c.Owner.Name; if (...
2
votes
2answers
1k views

Time Dependent Workflow with multiple email alerts

I have time dependent workflow email alerts on a custom object which send outs an email alert to user 60,30,15 days before expiry date.But when a new record is created on a custom object with 16 days ...
2
votes
1answer
3k views

Too many queueable jobs added to the queue: 2

I am trying to update user records using batch and I am getting this error Too many queueable jobs added to the queue: 2 I found out that the batch update is triggering triggers on the user and ...
2
votes
2answers
5k views

Send email to queue members using apex

I need to send email to queue members of queue on update case record based on some conditions. There are multiple queues and on case there is one field based on that I need to send email... How can I ...
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....
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
93 views

How to find Queue Priority number?

Is there a way to query Queue priority? and I know you can find the Queue via soql: select Id from Group where Name = 'my group' and type = 'Queue'
2
votes
4answers
3k views

Warning: Added entity: My_Custom_Object__c support on queue: MyQueue

I'm using the Salesforce Migration Tool (Ant) to migrate a custom object. I am using the migration tool to pull the custom object down then deploy it. The package.xml is very simply... just trying to ...
2
votes
1answer
833 views

created a assignment rule on lead. But no queue is assigned.

I have created a assignment rule on lead. When a lead is created get assign to a user x. I have not added the user to the Queue. Even then the lead is getting assign to the user x. when the lead is ...
2
votes
1answer
2k views

Case disappears from queue after assigned to support user

My organization has a handful of support queues based on the type of issue received. A new queue was recently established for a new area of support. In the new LibRel queue, when a support staff ...
2
votes
1answer
1k views

Assign a Task to a Queue [Spring 20']

in Spring 20' Release has been enabled the opportunity to assign a new Task to a queue if it has been added to its supported objects. Instead of doing that from the UI, I'm trying to do this in ...
2
votes
1answer
122 views

Can turning Deliverability on cause previously triggered emails to be sent?

The Scenario: I turn deliverability off in my salesforce org I update records which trigger automation to send out email alerts. No emails are sent because deliverability is turned off I turn ...
2
votes
1answer
2k views

Are approval requests that are submitted to queues distributed or shared among the users of the queue?

I'm trying to create an approval process using a pool of users as approvers, but I don't know the full mechanics of Queues. When a document is submitted to a queue for an approval, does that document ...
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 ...
2
votes
2answers
1k views

Insufficient Privileges error on record detail in Partner Community

I've got Partner Community Users (not High Volume) and I want them to see a Contract record. I recognize there is no ContractShare and his visibility must be absorbed from the Account The Sharing ...
2
votes
2answers
384 views

Should cases be closed at the queue level?

Trying to determine best practice in queue management. New setup - want to see if it's best for users to always take ownership of a case and then close it at a user level. Or if it's OK for cases to ...
2
votes
1answer
64 views

User can not remove from queue after changing the role

We have a Case Assignment rules which is assign to a particular queue and in this queue, there is role 'ABC' added in it. When I change the User's current role from ABC to XYZ, it can not remove user ...
2
votes
1answer
4k views

Accept button is missing for Queued records in List View's on Lightning mode

While submitting records to a Queue I am seeing user belong to the queue is not having an option to accept the records from the List view. When the user switches back to the classic from lightning the ...
2
votes
1answer
2k views

how to remove a user from Queue with apex program

I need to remove a User from a queue through Apex. I tried to insert and delete a User from a queue. While inserting there was no issue, but there was an issue in removing user from queue. System....
2
votes
1answer
567 views

Async Apex & Fault Tolerance

Trying to see if I can make Async Apex jobs fault tolerant; meaning if they fail can I implement some sort of retry logic? What would this retry mechanism look like and is there any documentation or ...
2
votes
0answers
448 views

Queue email notification not working on Dev Sandboxes?

Is there any limitation on environment where Queue Email Notification are not working? I created a Queue on Developer Sandbox and set Send Email to Members true, and set Email Deliverability to All ...
2
votes
2answers
1k views

Live Agent Queue Position - hide clientChatQueuePosition in custom chat page when no users are in queue

In Salesforce Live Agent, I have built a custom chat page so I can display the number of customers in the queue that are ahead of the current user while they are waiting for an agent to pick up the ...
2
votes
0answers
3k views

Assign Workflow Tasks to Queue or Public Group

How to assign the workflow task to group of users(Public group or Queue).I see this feature is not available in salesforce.Here are the idea exchange links for Queue and Public Group Is it possible ...
1
vote
2answers
358 views

Test a Trigger with Queues

I am trying to write a test for my trigger that will queue up some job, unfortunately according to Salesforce, tests can't have chain-able queues. https://developer.salesforce.com/docs/atlas.en-us....