The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [queueable-apex]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Queueable apex duration time issue

I'm running a Queueable that upsert contacts (in my example case it's just two contacts) and calling a batch with a Map < Id,String > - which Id is the Id of the upserted contacts, and the String ...
1
vote
2answers
32 views

Uncommitted work pending in unit test with queueable chain and httpcallout

I have a Schedule job that invokes a class and from there i call the Queueable class like this: ID jobID = System.enqueueJob(new NSQueuebleJob(acList)); The queueable class is: public class ...
3
votes
3answers
69 views

Apex more than 50 Queueble jobs

I have this class that call a Queueble job more than 50 times in a loop. I recive the error: Too many queueable jobs added to the queue. The limit is 50. Here is the class: global class ...
2
votes
1answer
62 views

How do SOQL queries act in Queueable (async) apex?

I have a set of 4 Queueable apex classes that perform an ordered series of tasks on a large number of records. It queries a limited number of records, modifies them so that they no longer meet the ...
1
vote
3answers
42 views

Future method completes first before the queueable

My scenario is: A future method is on a queueable class. Queueable job comes first before the Future job in the Apex Jobs. Upon checking the completion date(time), the future method is completing ...
0
votes
1answer
41 views

Why isn't my Queueable chain working?

I have the following class, none of the dependencies invoke Queueable: public class TEST_SandboxDataFactory { public static void create() { List<SObjectType> sObjectTypeList ...
1
vote
3answers
89 views

Why queuable apex accepts sobjects where as future methods doesn't?

I was going through asynchronous apex and reading it made me confused at one point. In future methods, we cannot pass sojects for reasons future methods being executed at a later point of time, by the ...
0
votes
0answers
9 views

How come my enqueued class is still getting executed in my unit test when I never call start/stopTest methods? [duplicate]

Per salesforce docs (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_tools_start_stop_test.htm): All asynchronous calls made after the startTest method are ...
4
votes
2answers
77 views

Spin locks with variable time retry backoffs

Use Case After insert triggers start Queueable Queueable execute() contends for same resource, uses spin lock to wait for resource availability. Many queueables could be running at same time. ...
0
votes
1answer
122 views

Conflicting triggers

I'm still new to Salesforce and still can't grasp regarding triggers. Scenario: My company's salesforce workspace has a managed package app installed. The managed package app has a custom trigger for ...
0
votes
1answer
108 views

Queueable Apex vs process builder and Flow

Here is the scenario: On insert of a record/records of Object - Apartment__c and conditions like Floor>7 AND Num_Of_Appt > 200(has like 4-5 conditions that should be met) , I should Query the ...
5
votes
2answers
85 views

How to disable asynchronous jobs so that they cannot update data

There will be a data export happening from our org for large number of objects and records using a cloud based ETL tool. We have a business scenario where we need to make sure that there is no data ...
1
vote
1answer
118 views

Queueable Apex in a Before Trigger

I am attempting to create logic that, on Contact record insert or update, will compare the Phone value of the record to another reference object and conditionally populate a checkbox as a result of ...
0
votes
1answer
152 views

Schedule a Queueable class

i am quite new to salesforce so i am not sure about this, and i wanted to get a clear answer since i haven't found one yet. Can i schedule a Queueable class that basically makes a callout to get and ...
2
votes
3answers
137 views

Overcome Queueable maximum depth limit in dev orgs

To migrate "trees of related data" from an external system to Salesforce I am using dynamic chains of Apex Queueables. Imagine I am "synchronizing" Accounts, Opportunities and Contacts from an ...
5
votes
2answers
347 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 ...
1
vote
1answer
19 views

Chaining Queueables: Does the second job count against the shared limit for asynchronous Apex method executions

When you are chaining Queueables: Does the second job count against the shared limit for asynchronous Apex method executions. I am trying to reduce our number of jobs as we are nearing our ...
0
votes
0answers
43 views

Did not receive exception email in production

We usually get exception emails to our admin from the production. I have a asynchronous code running in production @future public static void processRecords(String FIMCJSONRec) { ...
2
votes
2answers
241 views

Queueable Apex consideratoins

This is more of a theoretical question and probably goes more to design and I hope I can do this justice. I have successfully coded in apex multiple triggers which make callouts using the @future (...
2
votes
0answers
665 views

Testing a queueable class containing a future callout [duplicate]

I have a queueable class that makes callouts (@future(callout=true)) in the execute method. When I manually test this, everything works correctly. But when I set up my test class, it gives me the "You ...
2
votes
2answers
255 views

Create Custom Object Share record as Community User

Similar to this question, I cannot create a CustomObject__Share record as a Community User (Customer Community License). Taking the advice provided there, I have created a Share__c object that ...
6
votes
2answers
6k views

Callout Limits for future methods and queueable apex

I'm aware from the docs that "A single Apex transaction can make a maximum of 100 callouts to an HTTP request or an API call." Is anyone aware if that limit is higher in a future methods or ...
11
votes
1answer
1k views

Uncommitted work pending in unit test with trigger and queueable callout

I have an after insert trigger that invokes queueable Apex which makes a callout. The trigger and callout work fine in the UI and I don't get any errors in normal operation. However, my unit test ...
1
vote
3answers
236 views

I need batch class to process 1cr records

I have almost 1cr records which needs to be updated . i used below batch class. But as per the limit of 10000 Total number of records retrieved by Database.getQueryLocator 10,000 how can i process ...
0
votes
1answer
59 views

Does Queueable Apex job run if parent process crashes?

We are using a custom Email To Case Handler apex class. So that we can keep track of incoming emails if the custom handler crashes for any reason, we have just implemented code at the start of the ...
2
votes
1answer
473 views

Issue with Invocable Method to Call Queueable

Ok, I'm officially confused. I've written some code to attempt to populate a Campaign lookup field on Opportunity based on some logic. The basic flow is Process Builder (so the client can ...
10
votes
1answer
955 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 ...
1
vote
1answer
179 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 ...
2
votes
0answers
119 views

All attempts to execute message failed, message was put on dead message queue

I have a process that is chaining Queuables using a future method similar to this: public class MyQueuable implements Queueable{ public virtual void execute(QueueableContext context){ //do ...
1
vote
1answer
188 views

Queuable Apex - chaining jobs vs calling other classes synchronously

I'm learning Queueable apex and want to make sure I understand what the benefit of chaining jobs is, as opposed to simply calling other class methods within the method synchronously. Here's my ...
4
votes
3answers
1k views

How to set time limit between queued jobs?

So I am looking to implement Queueable jobs in apex to send 200 emails (1 job) every 30 minutes until all the jobs are done, I am struggling to find any documentation on how this functionality can be ...
5
votes
1answer
2k views

Access Data on Queueable class

I'm playing around with Queueable class to possibly implement in a upcoming project. Here is what am trying to do. I have a Queueable class. public class SampleQueueble implements Queueable { ...
0
votes
1answer
61 views

Filling custom field with Queueable Class

I'm new to Apex Developing and I'm facing pretty strange issue with my code. I've recently write queueable class to check custom checkbox on Case Alert_view__c. The idea is that checkbox will be set ...
1
vote
1answer
2k views

Limit of Queueable Jobs Added to the Queue?

I have chained three queueable classes. Couple of them have callouts and other one is not callout. For both the callout classes execute method execution, "No of queueable jobs added to the queue" is ...
7
votes
1answer
784 views

Test execution order issues with Queueable and @future method

Test code: * Test.startTest(); * System.enqueueJob(new MyJob()); * Test.stopTest(); * System.debug('Quering record for assertion'); Expected Queueable job execution: * Job Start * Query records * ...
9
votes
1answer
763 views

Are queueable jobs actually queueable?

Do jobs placed in apex queue are actually executed the order they've been put in? Or is this expected by developer to be implemented manually by using chaining?
0
votes
2answers
77 views

Queuable interface calls many times

I'm calling a queuable interface via a trigger afterupdate. this queuable interface is allowing callouts to an external webservice ( Database.AllowsCallouts ). When I check the apex jobs, I found ...
0
votes
1answer
1k views

Unit test for a Queueable class behaves differently

I have written a class which implements queueable interface and creates PDFs and saves them as attachments. Which is working fine. public class ExpensePDF_Async_Helper implements Queueable, Database....
12
votes
1answer
5k views

Difference between Queueable apex and future method

I understand that you could pass collection of Sobjects to Queueable apex classes but not to future methods where we're restricted to only primitive collections. The reason it's not done for future ...
1
vote
2answers
631 views

Execute method not getting invoked in Queueable

I wrote my first Queueable class public class ExpensePDF_Async_Helper implements Queueable, Database.AllowsCallouts{ private List<Expense_report__c> PDFsTocreate; ...
5
votes
1answer
79 views

Queueable logs don't have a completed date?

Working on writing a queueable and noticed that the completed date field under Apex Jobs is blank. Futures have this. Is the only way I can get a run time is to log it myself?
8
votes
2answers
5k views

Is it possible to queue a queueable apex job from a scheduled apex job?

I am attempting to implement a piece of scheduled apex which can work in an org with remarkably long computation time, meaning only a few hundred records can be operated on in a single context before ...
3
votes
1answer
142 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 ...
4
votes
1answer
924 views

Queueable Apex: Unable to log exception to a custom error object

I am developing a Queueable class in Apex. This class is going to be used to feed data to salesforce from external systems. I am seeing the following issue. I followed this example of logging to a ...
3
votes
1answer
424 views

Queueable DML capability

When using Queueable class for DML operation, what are the limits impose? Is it 10,000 dml rows and 50,000 rows retrieved from SOQL? In fact i was trying to implement the queuable interface in a ...
3
votes
1answer
57 views

Queueable Chaining - Not Getting Enqueued?

I've got a Queueable that I use to perform asynchronous calculations. Because I sometimes have a lot of these operations going on at once (for instance during our data back-fill), I want to make sure ...
2
votes
1answer
2k views

How to pass SObject in future method?

I am a beginner in programming world. I know the reason for error that we cannot use sobject as parameters in future method. Checking on forums i came to know that we can use set and then query record ...