Questions tagged [asynchronous]

An asynchronous process is a process or function that executes a task "in the background" without the user having to wait for the task to finish. Typically, you will use Asynchronous programming for callouts to external systems, operations that require higher limits, and code that needs to run at a certain time.

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Best way to add a progress bar to indicate loading?

I've got a complex process that takes about thirty seconds to execute, depending on how many records are in the org. I can estimate the completion percentage by iterating a count variable in my for ...
Isaac L's user avatar
  • 174
1 vote
1 answer
153 views

Best way to automate checking record with specific criteria for every 15 minutes?

What is the best possible way to check record that match with my criteria and update it? i have try using scheduled jobs that run every 15 minutes but sometimes it run sometimes it doesn't run. it ...
Febrian Rizky's user avatar
1 vote
2 answers
134 views

Understanding persistence in @future call

I was reading about using @future and the asynchronous process and I wanted to get clarification on persistence. For example, if I have an @future method that makes a call to an endpoint in which I'...
Dman100's user avatar
  • 2,415
1 vote
1 answer
449 views

Handling Asynchronous Responses from Box.com

I'm using the Box Toolkit for Salesforce. As you know, in Apex I have to make asynchronous calls to Box. My problem is that sometimes when am performing multiple operation, such as creating a folder,...
Mitch's user avatar
  • 33
1 vote
1 answer
1k views

AsyncApexJob returning two records for one executed instance of batch

When I am executing one batch then that batch runs only once. I have verified it from the 'Apex Jobs' from Setup. But when I am querying the AsyncApexJob for that batch class, it is returning two ...
Muskan Agarwal's user avatar
1 vote
1 answer
878 views

Why does Future and Queueable or any Async rollback or does not get called when an exception is occurred in Main Thread?

I was trying to test if Async opens up a new thread or is tied to the main thread and the result was very interesting. Consider this class: public with sharing class TestClassTest { public static ...
Nagendra Singh's user avatar
1 vote
1 answer
204 views

How to process a bulk of records manually

I have a visualforce page where users upload a csv file to create person accounts. This worked fine in a small sample size, but when I try a bigger file I got a timeout issue. So I split up the code ...
C.Flye's user avatar
  • 23
1 vote
2 answers
460 views

Does NetworkMember solve the problem of assigning the Network Id in Communities/Experiences?

See: Why does adding a Queueable cause an INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY error? for some background. That results in the need to set the NetworkId (there is one of these per Community) ...
Keith C's user avatar
  • 135k
1 vote
2 answers
1k views

Making Workflow (Process Builders/Flows/etc) run asynchronously?

We are running into performance issues/CPU timeouts due to all the Process Builders, Flows, and workflow rules we have on the Case object. In particular these errors occur when we bulk insert ...
ronnie777's user avatar
1 vote
1 answer
419 views

Working with large data volume

I have a design question and I want an expert opinion from the group. Here is the use case: Whenever there is any update on the Booking record (let's say change the status to "Cancelled"), ...
Noob_NoVoice's user avatar
  • 2,709
1 vote
1 answer
1k views

Unit testing Schedulable that calls future method

This has been asked here and here, but I'm not satisfied with the answers. Hoping to gain a better understanding of this. In working through the Apex Specialist Superbadge, the callout portion of the ...
Matt's user avatar
  • 13
1 vote
1 answer
625 views

Shared Static Variables between Triggers and Async Operations

When sharing Static Variables between a Trigger Context and an Async Operation such as Batch Apex, is it possible for there to be a conflict between the two? For example, say I have a Trigger that ...
02384705287409872098374's user avatar
1 vote
1 answer
308 views

How come Queuable apex accepts sobjects where as future methods doesn't? [duplicate]

As we know we cant pass sobjects to @future method due stale of data during the processing time,where as not same in case of Queable apex.How exactly its working by using Sobjects here?
SUresha Shettigar's user avatar
1 vote
1 answer
375 views

Experiencing a variable delay in HTTP Callout execution from Apex Trigger

I have built an application that has 2-way integration with Salesforce using their REST API and Apex Triggers, which send a request to my web service using an HTTP Callout when a custom object is ...
sam's user avatar
  • 113
1 vote
1 answer
254 views

Why i cant invoke ASynchornous method before Callout?

i cannot invoke asynchornous method before Callout,how to resolve this issues? public class CalloutService { public void callout_test1() { CalloutService.doDML(); HttpResponse r = ...
F.Jony's user avatar
  • 61
1 vote
1 answer
1k views

Asynchronous Calls: Order Of Execution In A Test Method

Imagine the following scenario: Trigger myTrigger on User calls a future method which flags Account records. Then a Batch Job must run to process the records. While testing, I am first inserting ...
ManSpan's user avatar
  • 1,378
1 vote
1 answer
469 views

Is it possible to create user and assign permission set in same flow?

I am trying to create users and trying to assign permission sets to them using flow. Since we get MIXED DML error when we try to do both of these tasks in a single transaction, I tried to use the ...
Ashik Shetty's user avatar
1 vote
1 answer
1k views

Metadata cannot be deployed from within a test [duplicate]

When trying to insert a custom metadata record within the test it gives me the following error @IsTest public class Object_1TriggerTest { @IsTest public static void Load_field_1_from_metadata()...
Ernesto Truyen's user avatar
1 vote
1 answer
129 views

Is there a way to get the ids of the inserted records when using Metadata.Operations.enqueueDeployment

I was going through the documentation and I saw this example public void updateAndDeployMetadata() { // Setup custom metadata to be created in the subscriber org. Metadata.CustomMetadata ...
Arthlete's user avatar
  • 4,857
1 vote
1 answer
567 views

Handling a combination of async callouts, schedulable jobs, and queueable jobs

The current requirements for my system is as follows: When a certain change is saved on the Account object, I need to create an Order object and make a callout to Service A. Service A finishes ...
Douglas's user avatar
  • 45
1 vote
1 answer
40 views

how quable solves the problem of having soobjcets in future mthods?

As per my knowledge both future and quable are async methods ,we don't know when they run,that's y we cant pass sobjects as parametrs in fuute methods(i read in future trailhead) because objects state ...
Ganesh Thota's user avatar
1 vote
1 answer
650 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
1 vote
1 answer
596 views

Uncommited work exception in Queuable with Callback and Rollback

Is there a way to do all that Do Callout in Queueable Do Dml based on the Callout result Catch errors in 1 and 2. Rollback 1, 2 on error Report error via email and log in Custom object without ...
Robert Sösemann's user avatar
1 vote
1 answer
249 views

Command pattern with batch finish method

To chain a execution of a batchable object, I pass the batchable contructor a ICommand. public interface ICommand { void Execute(); } When testing this approach I create a test ICommand which ...
Matt's user avatar
  • 117
1 vote
1 answer
701 views

Error while opening PDF document created through Future method

I have a webservice class 'restExample' which first performs DML operations and then calls a future method 'createDocument()'. This method will create PDF document. One important point: Running user ...
devforce's user avatar
  • 1,543
1 vote
1 answer
2k views

Redirecting on user click but pop up blocker Is disabling the redirect

I have a situation where a user fills out some information and then clicks submit. When they click submit, an asynch operation gets set in motion. Once, I get a successful response, I want to ...
Chase Klingel's user avatar
1 vote
1 answer
2k views

How to find out the Send Id and Batch Id of an Asynchronous TriggeredSend

Disclaimer: I'm new so I may not have the terminology down. I'm including links to the documentation on the Exact Target site regarding the APIs we are using. We are using Asynchronous Triggered ...
Gir's user avatar
  • 31
1 vote
1 answer
258 views

FTP SSL documentation for Batch File Export (Bulk Async) Call is wrong. Can't get it to function

Output for a Batch File Export (Bulk Async) Call is Below is what we are finding in trying to make use of this: The documentation for enabling FTP SSL does not work. Documentation Link: http://...
Stephanie Moffett's user avatar
1 vote
1 answer
2k views

Examples of using queryAsync in SOAP API?

I've been looking around online for examples for using queryAsync() in the SOAP api, but I can't seem to find any. Can someone using Async calls using the SOAP WSDL api in C#?
RJP's user avatar
  • 177
1 vote
1 answer
103 views

Async/await is not working in LWC components on Firefox

We tried to use it in our LWC async/await but it is not working only on Firefox. Here is a simple example. On the Firefox this alert doesn't show. async init() { let promise = new Promise((resolve,...
hsd's user avatar
  • 123
1 vote
1 answer
570 views

Async call on aura:method?

I got an aura:method inside my child component that returns an async response <!-- inside child component --> <aura:method name="saveMethod" action="{!c.saveChanges}" ...
erikvm's user avatar
  • 721
1 vote
0 answers
448 views

Governor Limits: Scheduled Flows vs Async Apex

tl;dr - Do schedule flows (flow builder, not process builder) count against the same limit of scheduleable jobs that asynch apex (Queueable, Scheduleable, Batch) is limited by? If not, in what way to ...
Jwok's user avatar
  • 767
1 vote
0 answers
233 views

Does each chunking of a batch goes through the same process of Queued, Processing and Completed states?

As per documentation : The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period For Batch Apex, method ...
Nagendra Singh's user avatar
1 vote
0 answers
170 views

Modern polling solutions [closed]

Among the several ways we have in salesforce to do polling to 3rd parties using callouts, I see important drawbacks for each of those that make taking a decision difficult. Background solutions are ...
Manuel Moya's user avatar
1 vote
1 answer
517 views

Populating a combobox with Salesforce data

I want to create a component with one input box with type="date" and a combobox that gets populated with options after a date is selected in the first input box component. I want this to ...
adidascoder's user avatar
1 vote
1 answer
924 views

Testing Apex Trigger with Asynchronous HTTP Callouts

I have an apex trigger f_contactPushNotificationTrigger that should fire when a new contact is created. This trigger call f_PushNotification class used to Post data. I used @future to make this task ...
MRDRAG's user avatar
  • 21
1 vote
0 answers
225 views

Calling Salesforce Rest Webservice url from vf controller

Hi I am trying to make a rest callout from controller and I am not been able to get response . I am using apex continution callout pattern for this to make call async. This is controller class ...
Hussain Gadisaaz's user avatar
1 vote
0 answers
58 views

Custom component taking long time to load

I'm having a record page with an heavy custom components. By heavy I means like 20 seconds of loading time. I'm trying to find a way to load it asyncronously without blocking the UI of the User. ...
Zeno Trevisan's user avatar
1 vote
1 answer
211 views

Initialize jQuery plugins with ui:outputRichText in Lightning component

I have a Lightning component that displays record's content as rich text. The content contains HTML code and I need to make it work with jQuery on click handler and some plugins. The content comes ...
Andrey Metelsky's user avatar
1 vote
0 answers
1k views

Apex Continuation - Response Method

I am using Apex Continuation to make a callout from a VF page, but the response method is not being executed and, as a result, no response is displayed on the page. Can anyone please see why this is ...
J. Radcliffe's user avatar
1 vote
1 answer
209 views

Fuel Java SDK - Asynchronous Triggered Sends

Are asynchronous triggered send calls possible using Fuel Java SDK v1.0.3?
Tom Wagner's user avatar
0 votes
1 answer
90 views

Why do developers set 'this' to a variable (e.g. 'self' or 'that')?

When I inherit another developers code base I will often see something declaration like the following: I have seen this most frequently used in LWCs. But I'm not sure what the purpose is and given the ...
thinker's user avatar
  • 1,402
0 votes
2 answers
642 views

How to refactor Synchronous code with future method

I have a future method that is called in trigger to create some records, and after that i use the records created in the future method to associate them with other entity. Since future methods are ...
ihssan's user avatar
  • 488
0 votes
3 answers
2k views

Is asynchronous apex either rolled back or not executed if the original transactions fails?

I would like to confirm the behaviour of asynchronous apex when an error occurs on its original/parent transaction. Imagine we have a synchronous apex transaction (Transaction1-Apex) that launches a ...
Pere Marti's user avatar
0 votes
2 answers
741 views

Question for confirmation: Callout from Trigger using Platform Events

After a record is updated in Salesforce, i need to perform a callout to synchronize data to an External System. Ideally, i would like to do this kind of synchronously, however it doesn't seem to be ...
Giorgos Galaios's user avatar
0 votes
3 answers
1k views

Can Queueable run in parallel with calling transaction?

SimpleQueueable.cls: public with sharing class SimpleQueueable implements System.Queueable{ public void execute(System.QueueableContext ctxt){ //query the record inserted in calling ...
javanoob's user avatar
  • 8,787
0 votes
1 answer
1k views

Exception in @Future Method - System.QueryException: Record Currently Unavailable

I am facing error in one of future method (calling from trigger handler). This error occurs when integration event submit these record in bulk but when i am doing this from UI i do not get this error. ...
Sfdc_1184's user avatar
  • 133
0 votes
1 answer
425 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 ...
Brian Kessler's user avatar
0 votes
1 answer
835 views

Batch Apex: class executed multiple times at once?

I have a batch apex class, and this class makes a SELECT with a limit of 1000. after that, this class creates one campaign using insert, and processes others things, whatever. the question is when I ...
Arthur Almeida's user avatar
0 votes
2 answers
321 views

Best practice for async apex classes (Queueable, Batchable) in relation to service classes

When creating async apex classes (e.g. Batcheable, Queueable), especially classes associated with specific SObjects, what might be the best practice for where these async classes should be housed. ...
Jwok's user avatar
  • 767

1 2 3
4
5
7