Skip to main content

Questions tagged [queueable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
94 views

How to process notification sequentially from salesforce to external systems?

How to process notification sequentially from salesforce to external systems ? We are seeing sometime the execution order is not properly handled within salesforce using Queueable. For Example: ...
Gourishankar's user avatar
-2 votes
1 answer
67 views

How to write test class for httpcallout which is written in queueable interface

I have a class when QuoteAwsAccountId Object is created or AwsAccountId value inside the QuoteAwsAccountd object which is a string then it should make a get call to external api using Named ...
surya k's user avatar
1 vote
2 answers
137 views

I want to write a unit test that can assert an enqueued job called a specific @Future function

To start, let's say I have this simple unit test: @isTest public static void shouldCallFutureMethod() { Test.startTest(); System.enqueueJob(myQueueableJob); Test.stopTest(); } Given ...
J. Dufresne's user avatar
1 vote
0 answers
39 views

I need simulate an exception for a test

I have a problem making a testclass. I need to simulate an exception for this class: public class ScheduleOmniAlta50 implements Queueable, Database.AllowsCallouts { private String body; ...
Gonzalo's user avatar
  • 15
0 votes
1 answer
97 views

Salesforce System.AsyncException - scheduled class calls Queueable apex do a callout and then calls batch apex

I have a schedule apex class that calls Queueable apex which calls a class that do a callout and then execute batch. I receive System.AsyncException: Database.executeBatch cannot be called from a ...
Muhammad Refaat's user avatar
-1 votes
1 answer
87 views

Queueable Apex Running For Long duration

I am triggering a queueable apex but the class running for very long duration is very small class and perform apex sharing.
Mkg789's user avatar
  • 1
1 vote
3 answers
753 views

Does Queueable Apex guarantee preventing deadlocks if implemented correctly?

I just want to confirm my understanding is correct of whether or not Queueable Apex will alleviate an issue I am having with @future methods. Right now, in my org's account trigger handler class, we ...
Chris's user avatar
  • 71
1 vote
1 answer
863 views

Test method fails with Queueable job exception

I am trying to understand the behavior of testing Queueable classes, most specifically asserting that an exception was thrown in an execution. To provide some context: I have a Queueable Class (...
user1067017's user avatar
  • 1,024
1 vote
0 answers
229 views

Issue with Queueable that invokes a flow

In an attempt to reduce the number of SOQL queries being used within a trigger, I'm looking at moving some logic that doesn't need to be done real-time into a Queueable. In one instance, I have an ...
Michael Sobczak's user avatar
2 votes
1 answer
170 views

REST endpoint ContentVersion creation succeeds in synchronous mode but fails in Queueable for site guest user

I have a REST endpoint that, when called by a guest user, creates a ContentVersion file. When the process happens synchronously, the ContentVersion file gets created without issue. However, when the ...
Natalya Murphy's user avatar
2 votes
1 answer
600 views

Queueable HttpCallout.TooManyCalloutsException: Too many callouts requested vs SFDC Limit: 0

I have a Queueable class that performs a single callout. When it executes, it generates this error: HttpCallout.TooManyCalloutsException: Too many callouts requested vs SFDC Limit: 0 public class ...
cropredy's user avatar
  • 73.2k
0 votes
2 answers
512 views

Space Callouts in queueable apex in time

I have a requirement where I need to send a custom object to an external system. The records are usually created in bulk so I have a queueable apex class called from a trigger that loops through the ...
joaquin iñurrategui's user avatar
1 vote
1 answer
1k views

Test class for Transaction Finalizer is not working

I am stuck in the test class for the Transaction Finalizer class. Every time when we create an exception for Queueable class then Finalizer class executing and then the test class throws the error on ...
Naveen Tiwari's user avatar
2 votes
0 answers
374 views

Unable to Pass parameters to a visual force page as PDF in queueable class

I am trying to pass variables to visual force page PDF that I generate using blob in the controller which gets its variable values from the queueable class. I am required to create 1000s of PDFs per ...
Muhammad Ali's user avatar
3 votes
1 answer
709 views

Queueable Apex User Context in Unit Tests with System.runAs block not the same as productive code

I noticed that the running User Context of a Queueable Job in a unit test depends on who calls the Test.stopTest() method. Or rather when is the job to be executed in the unit test context. I wonder ...
alesremta's user avatar
  • 463
3 votes
3 answers
10k views

How to capture Queueable class status when job is completed

I have created Queueable class to process data and making the callouts this Queueable class executes upon after update and after insert of Opportunity object. Now in order to track the status of ...
Hunt's user avatar
  • 245
0 votes
1 answer
387 views

Is there an api to submit queueable job? [Api for System.enqueueJob]

Is there an api that allows to submit Queueable jobs? (basically which simulates System.enqueueJob) Searched Rest Api and other apis but couldn't find anything.
metasync's user avatar
  • 1,792
5 votes
0 answers
195 views

Test fails with runAs, queueable and callout in specific org

Has anyone got an idea what could cause the following test to fail in one org and pass in another? The error is System.CalloutException: You have uncommitted work pending. Please commit or rollback ...
James's user avatar
  • 2,649
0 votes
1 answer
1k views

Two Queueable jobs keep triggering the same trigger

So we have managed package that have a trigger on update Contact, lets call it Trigger1. Trigger one call a manged Queueable class that updates Contact. We have Trigger on update for contacts, lets ...
user1050491's user avatar
1 vote
1 answer
723 views

Queueable call not executing in case of partial success using Database.update

I have written logic that enqueues queueable class from trigger of one object. This works perfectly when I update records and all records gets updated successfully,but in case of partial success I can ...
Manish Khade's user avatar
0 votes
1 answer
118 views

Does mass updating contact records has any effect on Flex queues or Queues

I have a requirement where I have to schedule a job daily to update records on the Contact object in batches via API(about 30,000 a day). Would that impact the Flex queue or Queues by any chance? Just ...
Student's user avatar
  • 565
1 vote
1 answer
2k views

Mock test for callouts in a queuable function

I am having issue creating mock for callouts in a queue. I have done following.  I have a handler (OpportunityTriggerHandler) which creates a job called EnableOnboardingCompleteJob. This job calls a ...
Mohammed Fahad's user avatar
2 votes
3 answers
4k views

System.AsyncException: Maximum stack depth has been reached. while writing in test class

I've got a requirement to perform queueable apex in a trigger my class working fine, but while writing a test class for queueable apex I'm getting an exception. Could anybody can help me. Trigger ...
Gangadhar's user avatar
0 votes
1 answer
292 views

Testing Queueable Class 55% now

I'm trying to test a Queueable class and I'm getting 55% only.. I tried several things but I'm still getting only 55%. This is the class: public class SherlockQueueablePolling implements Queueable, ...
Carlos Naranjo's user avatar
5 votes
2 answers
1k views

Automated testing of chained Queueable jobs in Salesforce

I am currently writing a queueable class for asynchronous processing in my triggers since triggers do not allow callouts. I am going achieve it by calling a class which implements the queueable ...
Json Bourne's user avatar
1 vote
0 answers
1k views

Run Queueable as sequence

Good day Everyone, I have a trigger that will call a Queueable. The process looks like this : Trigger : for(User userData : Trigger.new) { if(Limits.getLimitQueueableJobs() - Limits.getQueueableJobs(...
Hope's user avatar
  • 1,273
2 votes
1 answer
7k views

UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 200 records - Error even after using FOR UPDATE

I have a trigger and I am calling a queueable job from trigger. Sometimes I get this error: Update failed. First exception on row 0 with id a0VN00*********; first error: UNABLE_TO_LOCK_ROW, ...
Ramy's user avatar
  • 61
4 votes
2 answers
301 views

How to ensure all Leads are processed in batch job before firing off next step?

We're using Omni-Channel to route leads to specialists, and have a requirement that certain leads come before others. In this case, we're relying on a custom field that is, in essence, a priority ...
Carl Anderson's user avatar
7 votes
2 answers
593 views

Generating quote PDF in the same context the quote is created (I found a dwarf)

When attempting to create a quote and then generate a PDF using the quote in the same context, I get one of the dwarf errors: Line: -1, Column: -1 ORA-20001: ORA-06512: at "HAPPY.CACCESS", line ...
gNerb's user avatar
  • 9,588
1 vote
1 answer
645 views

If tests are failing w/ 'Internal Salesforce Error' in Summer '18, what will happen to deployed version when Production upgrades? [closed]

I've been building out queueable processes in our Sandbox on Summer '18, and I was able to deploy some of the functionality last week to Production (Spring '18), and now those tests in Sandbox are ...
Duncan Stewart's user avatar
0 votes
1 answer
295 views

Creating queueable classes for trigger-like processing, hitting a 'de-reference' glitch

I have two queueable classes for handing off trigger-like processing; one Case-specific, one generic. The first implementation of the generic version also involves Cases, and editing a Case works in ...
Duncan Stewart's user avatar
11 votes
2 answers
13k views

Queueable - Callout not allowed from this future method

I am using a queueable class to handle various date ranges that are then sent to a web service. Upon calling the queueable class I am receiving the following error: Callout not allowed from this ...
S.B.'s user avatar
  • 2,141
8 votes
4 answers
4k views

Parallel callouts in apex

On some user action, I am calling several different third party services in order to update data in salesforce. As these callouts are time consuming, I would like to execute them in parallel, and when ...
Nikola Okiljevic's user avatar
0 votes
1 answer
845 views

Salesforce-Execute method of the queuable apex is not running

I have written the following queuable class : public class LeadTriggerQueueable implements Queueable{ list<Rejected_Hold_List__c> lstRejectedLead = new list<Rejected_Hold_List__c>(); ...
user45925's user avatar
1 vote
2 answers
517 views

Using Unit of Work pattern in Queueable Context

I'm trying to implement Andy in the Cloud's Unit of Work pattern within a queueable class so that I can handle the DML for the Milestones that I'm inserting & relating to the Projects, which are ...
Alex S's user avatar
  • 2,326
17 votes
1 answer
7k views

Chaining Queueables: Clarification & Practical Usage

I am trying to understand what I can and can't do when chaining queueables. I have read several tutorials on this but it seems contradictory that I can't create more than 1 child job, but I can create ...
Bob Hatcher's user avatar
1 vote
1 answer
263 views

Callout and chain Queueable - Spring 17

In Spring 17, I saw in the release notes (https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_apex_chaining.htm?edition=&impact=) that we can now chain Queueable Jobs that ...
Jon Duelfer's user avatar
  • 1,106