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.

47 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
0 answers
795 views

Implement Domain Event Pattern in Apex - can and should it be done?

In Domain Driven Design a single pattern is drawing a lot of attention to itself - Domain Events and Event Queues. (slide via http://de.slideshare.net/andysal/never-mind-the-bollocks-heres-the-domain-...
Robert Sösemann's user avatar
4 votes
1 answer
236 views

CDC processes all 9999 requests at once. Is this by design or a bug?

In salesforce documentation batch size of platform event is mentioned as 2000 maximum (documentation). Which it definitely follows (tested). But for CDC its not mentioned. I also tried this in my dev ...
Nagendra Singh's user avatar
4 votes
0 answers
230 views

Can a Change Event Trigger include the same record multiple times?

I'm starting to play with Change Event Triggers, building a handler framework and I'm not sure if I need to handle a scenario where the same record would be included in the same Change Event trigger ...
Mike's user avatar
  • 1,179
3 votes
0 answers
1k views

How to Target Element In Modal After Opening Modal

I have a custom modal component (with slots) that can be opened and closed. In a parent component I'm using this modal component and inside the body slot of the modal I have a <lightning-input> -...
jbyrd's user avatar
  • 601
3 votes
0 answers
354 views

Why does this Batch always and only abort in Production?

I have a long running asynchronous process that process millons of records in a CustomObject__c. To prevent other limits we have split this into 2 Batch classes that work on this table in parallel. So ...
Robert Sösemann's user avatar
2 votes
0 answers
63 views

Apex Engine old Version of apex code changed?

Recently (since January) we have encountered some cases when deploying new versions of our managed package. We have had at least 2 separate instances where changing a batch or an apex class referenced ...
Jose's user avatar
  • 2,092
2 votes
0 answers
294 views

Why does an Apex Action ConnectApi call from Flow work synchronously but fail asynchronously for Platform Integration User

Background We have a dev sandbox that is connected to and receives orders from a SFCC storefront, thus creating an Order record in the SF org. There is an OOTB Create Order Summary Flow that is ...
Moonpie's user avatar
  • 2,505
2 votes
0 answers
1k views

How to Launch Asynchronous Record Triggered Flow each time a Date Field is updated

I have a date field. I want to update the record every time this field is updated. Inside of the Record Triggered Flow I have an ISCHANGED condition and am seeing the following error when I try to ...
Matthew Metros's user avatar
2 votes
0 answers
326 views

Report Rest API (asynchronous run and excel export)

I'm trying to use Report Rest API to filter and export some of my reports. My first approach with synchronous report runs works pretty well, but I bumped into 500 batches' run per hour limitation. I ...
azimut3's user avatar
  • 120
1 vote
1 answer
475 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
409 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
  • 757
1 vote
0 answers
198 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
1 answer
484 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
0 answers
222 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
50 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
205 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
208 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
0 answers
43 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
  • 113
0 votes
0 answers
34 views

Failing Salesforce Queue

I am rearchitecting some apex code that I have been handed. I updated an @future method to use the Queueable interface, because as it turns out the method was being called as part of trigger that was ...
Luke Sharon's user avatar
0 votes
0 answers
76 views

Having issues with the flows whenever they run in Asynchronous mode

While working on establishing a record trigger flow, my objective was to synchronize and manage specific fields related to Skills and Certifications between the PSA system and the Skill object in the ...
Sai Praveen's user avatar
0 votes
0 answers
28 views

Capture few Case fields changes and send to third party

We want to track around 20-30 fields changes of case object. These fields changes can include the long text area field, multiselect picklist values, formula fields, and roll summary also. The reason I ...
Rabb's user avatar
  • 345
0 votes
0 answers
131 views

Can I run an asychronous flow after insert?

To create a flow that runs asynchronously I have to add a condition with ISCHANGED or configure it to run only when a record is updated to meet the condition requirements. The ISCHANGED function does ...
Emmanuel BRUNO's user avatar
0 votes
0 answers
40 views

Idiomatic way to call external APIs from Salesforce

I'm new to Salesforce, and am looking for advice on how to best approach a scenario where a Salesforce runtime communicates with an external REST-service that is under my control. My background is web-...
Arne's user avatar
  • 101
0 votes
0 answers
144 views

System.AsyncException: Database.executeBatch: batch apex job enqueue failed

I have a batch class which updates a set of records with data from an external system. About twice a month or so, this exception is thrown: errorCode":"APEX_ERROR","message":&...
Gabriel Gonzalez's user avatar
0 votes
0 answers
73 views

How asynchronous Flow get field values?

I am using an asynchronous flow to send an approval using some conditions. I want to know, suppose my flow runs after 4 minutes when it's synchronized, the values of opportunity record are used in ...
user126625's user avatar
0 votes
0 answers
269 views

What can be the reason why unit tests pass in the Sandbox environment but fail during deployment to the same Sandbox?

We have a Sandbox_1 where all unit tests are running properly, and we want to deploy our code to an entirely different organization via our repository When running unit tests we have issues with ...
LucyFenel's user avatar
0 votes
1 answer
375 views

Can multiple async methods updating same record can create row lock issue

Does multiple asynchronous process like Queueable, future etc running concurrently that are updating same record create row lock issues. We are facing row lock issues in async transactions that ...
sfdeveloper's user avatar
0 votes
0 answers
633 views

Time-based Workflow Schedule Date keeps getting pushed forward 5 minutes

I created a record triggered after update flow that tests if a field has changed in the entry criteria, allowing me to create an async path: When a record is updated, the immediate path executes, ...
Swisher Sweet's user avatar
0 votes
0 answers
114 views

Retrieve the index of item in list before insertion within Stateful Batch Apex Class

I have a batch class that implements the following headers Database.Batchable<Map<String, Object>>, Database.Stateful . Within the DocumentParser class, I am creating a Map Object that is ...
Matthew Metros's user avatar
0 votes
1 answer
1k views

Expand all rows of LWC tree-grid with asynchronous loading

I'm having trouble figuring out how to create a button to expand all rows with my current setup. The child rows are only loaded when the parent is toggled. Is there a way to retrieve them all at once ...
Luke Higgins's user avatar
0 votes
0 answers
586 views

Batch class finish method not executing on REQUEST_RUNNING_TOO_LONG error

I intended to send an email to the users when the batch class fails due to any reason. I had placed my logic in the finish method. However, my batch class is failing for the reason : [...
Shobhit Saxena's user avatar
0 votes
0 answers
387 views

Insufficient Privilege on id:[] accountcontactrelation create record failed

Context Account read privilege is at user level Sharing rule allows Users to see other User's Account records, Read privilege only. An LWc on a Visualforce Page allows a user to perform some business ...
BeginnerArtist's user avatar
0 votes
0 answers
1k views

Asynchronous Flow only working on create in Debug mode

I have been working on a roll up flow to sum up a field on a custom object and then update a field on the parent object with that total. However I have used the asynchronous path and while it works ...
Aaron's user avatar
  • 3
0 votes
0 answers
597 views

Was trying to get the Data from the API Endpoints and Insert into Salesforce Org

I am new to the Salesforce Developer and was trying to do something where I was trying to fetch the data from the API endpoints and Insert into my Object of salesforce Org. Using the Future ...
Aayush Aman's user avatar
0 votes
1 answer
470 views

How to achieve Asynchronous Apex with Aura Components? (NOT Callouts)

I have a working Aura Application with a requirement of showing heavy data inside of many lightning datatables based on the LoggedInUser. It works fine for majority of the users but for few, the data ...
apz's user avatar
  • 335
0 votes
0 answers
130 views

Executing a callout at the end of a chain of methods operating in @future context

I have a callout method that is executed as the last step of a long chain of methods when a record's status get changed to "completed". Early in this sequence, we have a method that we have ...
Trevor Gill's user avatar
0 votes
1 answer
96 views

Do workflow outbound messages (OBM) and @future methods share a single message queue for asynchronous processing?

Do workflow outbound messages (OBM) and @future methods both share a single message queue for asynchronous processing?
LakhanP's user avatar
  • 761
0 votes
0 answers
416 views

How can I access a High Assurance Session in an Async Apex context?

Has anyone worked with a high assurance session requirement and async apex? I need to query the Security Health Check objects during an async process (the query happens in a queueable). If "View ...
Toby Curtis's user avatar
0 votes
0 answers
133 views

Adding remoteSite settings dynamically from postInstallScript

I checked this link to add remoteSiteSettings dynamically. Above link suggesting to add visualforce base url to remote site setting first. I am able to insert that without any issues from synchronous ...
AshSFcloud's user avatar
0 votes
0 answers
303 views

AsyncSaveCallback not working in apex

I am trying to insert records to an external object and get the Id back for the inserted record I have the following piece of code Database.SaveResult[] insertResultAccount = Database.insertAsync(...
Madhurima's user avatar
  • 1,235
0 votes
0 answers
1k views

Why is SerialBatchApexRangeChunkHandler more than the number of batches?

I am working on batch apex and I have just tried writing a simple code for learning purpose. In the start method I am querying the records limiting them to 7, and I am running the batch job from the ...
Ayush Goyal's user avatar
0 votes
0 answers
332 views

Finding out when lightning-record-form has finished rendering?

I have a LWC which displays the Compact Layout as a popup in a graph using lightning-record-form. The LWC holds a <slot> in which the popup-lwc has the record for like so. <template> &...
PhilippUp2Go's user avatar
0 votes
0 answers
2k views

Using promises with aura component callbacks

I noticed there a number of questions listed regarding this topic but I don't have the time to parse through all of them and look for the relevant information. I was hoping someone could quickly ...
weytani's user avatar
  • 387
0 votes
0 answers
192 views

Callback on completion of AsyncApexJob

Is there a way to have Apex code execute when an asynchronous job finishes? I want to solve this problem without polling (which seems to be the dominant solution).
Mossi's user avatar
  • 3,886
0 votes
0 answers
402 views

Running Tests in Production WHILE Deploying to Production - Row Lock Error

In our test classes, we utilize testSetup methods that create and insert records in preparation for their use in the test methods of the class. I found today that if I'm running tests in Production ...
KB145's user avatar
  • 866
-3 votes
2 answers
23 views

While trying to run ScheduleApex it give error

//This is code global class Schedule1 Implements Schedulable{ global void execute(SchedulableContext sc){ List<Account> accounts=[SELECT ID,NAME,INDUSTRY FROM ACCOUNT WHERE NAME='...
Bikash Pradhan's user avatar