9 votes
Accepted

Alternatives for handling a Long Running Transaction

That's tricky. The first thing that comes to mind is to do it asynchronously and find a way to "subscribe" to the response. You can make use of Platform Events for this. Call your Apex class and ...
Shane Steinfeld's user avatar
9 votes

Continuation Object from Trigger

You don't need to do either. Simply make a Queueable action that you call from the trigger to perform your callouts: trigger XYZ on ABC (after insert, after update) { System.enqueueJob(new ...
sfdcfox's user avatar
  • 481k
6 votes

@future method vs Async callout

The Async class is intended to be used in a continuation. See Make Long-Running Callouts from a Visualforce Page Basically, a continuation will provide a callback mechanism so that when the async ...
Daniel Ballinger's user avatar
5 votes
Accepted

Continuation: Constructor not defined

Based on the code you've posted, it seems that you have a class named Continuation. You should rename the class so it does not conflict with the built-in class. Alternatively, you can fix it locally ...
sfdcfox's user avatar
  • 481k
5 votes
Accepted

Lightning components and Continuations

After working with Salesforce on this I got interim workaround until continuations are supported by Lightning framework. Create a Visualforce page what will be performing callouts using continuations ...
user2174835's user avatar
4 votes
Accepted

Code Duplication when using Continuation Framework

Only the code for creating the Continuation and the callback handler need to be in the controller. The code to create the HttpRequest and then handle the HttpResponse can still be in your utility ...
Mark Keats's user avatar
  • 1,899
3 votes
Accepted

Continuation not working for the endpoint which has Curly braces in it

That isn't a valid URL. Curly braces need to be percent-encoded when they appear in a URL, as other invalid and/or "unwise" characters as defined by the RFC. See When, if ever, should characters like {...
David Reed's user avatar
  • 92.1k
3 votes

Continuation Error: StatusCode=400

I think as of now certificate based authentication is not supported in Continuation. Ref : https://www.youtube.com/watch?v=vgQe0iokHUM&feature=youtu.be&t=1926
Kiran Machhewar's user avatar
2 votes
Accepted

Asynchronous Callouts/Continuations in Embedded Visualforce

There is a known issue when you use Continuation with Visualforce pages re-render action. I am not very sure it is related to it but seems like you have found another way of same problem. Eventually ...
Ashwani's user avatar
  • 22.6k
2 votes
Accepted

Making an Asynchronous Callout from another class

Generally speaking, a Continuation requires a Visualforce page. There was a work around presented by Reggie Nair in his Dreamforce 2015 Session - Introduction To Apex Asynchronous Callout Framework, ...
Daniel Ballinger's user avatar
2 votes
Accepted

Using Continuation without Visualforce

If you are running into limits on the number of callouts you can make in a scheduled job, the solution to execute a batch job and set the batch size to 100 (or some smaller number if you make more ...
David Reed's user avatar
  • 92.1k
2 votes

DML operations in the Apex callback method

I found a working solution for doing DML from a continuation method. According to the documentation for Continuation Limits, An Apex method that returns a Continuation object can’t perform Data ...
Zach's user avatar
  • 368
2 votes

How to create controller class instance to pass it as argument of 'Test.invokeContinuationMethod' while Callback method is Static

I think this is a gap in the testing framework for continuations. The problem is not that your method is static, but that the callback method does not match the method signature expected by Salesforce,...
James's user avatar
  • 2,639
2 votes

LWC Continuation Issue: Apex methods for continuation can not be invoked from a non-continuation action

The issue was in lwc import. import getTotalNetPriceFromSAP from '@salesforce/apex/SFMS_SubscriptionsOverviewController.getTotalNetPriceFromSAP'; But for Continuation it must be: import ...
m_konyk's user avatar
  • 546
2 votes
Accepted

Apex Continuation method that call service method

LWC import must get Apex method from apexCountinuation but not apex resource. '@salesforce/apexContinuation/ApexClass.ClassMethod'; not '@salesforce/apex/ApexClass.ClassMethod';
m_konyk's user avatar
  • 546
2 votes

Continuous integration using REST api in vf page

A Continuation has nothing to do with continuous integration. From the perspective of the on-platform developer, the response data is stored in the Continuation object, and is accessed via ...
David Reed's user avatar
  • 92.1k
1 vote
Accepted

Apex Continuation execution failed and did not start - LWC

Seems like the issue was with the Remote Site settings where I had to include the endpoint as: https://myRESTapiURL.com:11305 to make API callout successful, instead of https://myRESTapiURL.com. I ...
Arnold Jr.'s user avatar
  • 1,491
1 vote

Callout not happening from Continuations class(LWC)

There is no triggering point for findContacts in your code. You should call that from connectedCallback, if you want the callout to happen right after component loads. connectedCallback() { this....
Nagendra Singh's user avatar
1 vote

Resume logic after long-running service sends Platform event

There's no single feature that is responsive to all of these functional needs. You'll need to do some work, possibly quite a bit of work, both to build this overall process orchestration and to make ...
David Reed's user avatar
  • 92.1k
1 vote

Callback method is not getting called in continuation object

As you are declaring endpoint directly in class String endPoint = 'callout:SFDC_SRC/services/apexrest/v1/getAccounts/';, you are getting invalid session Id error. Refer to this document: (Holds true ...
salesforce-sas's user avatar
1 vote

not able to access the variable values after using the continuation class

Not sure why you are implementing continuation as you are not even using Labels and importantly you are returning something from database and not from external system. However, you will need labels ...
salesforce-sas's user avatar
1 vote

DML operations in the Apex callback method

We had the same issue for an LWC we had created, turned out it was not due to the Continuation it was because we had used the @wire service to make the call. I am guessing the @wire service forces ...
Marcus Riquier's user avatar
1 vote

call out method is not called in a continuous class, call out from VF page

From the documentation of Continuation. A user invokes an action on a Visualforce page that requests information from a Web service (step 1). The app server hands the callout request to the ...
Pranay Jaiswal's user avatar
1 vote
Accepted

Chaining Continuations - would each continuation be executed in separate transaction/limit scope?

Asynchronous Callout Limits: When a continuation is executing, the continuation-specific limits apply. When the continuation returns and the request resumes, a new Apex transaction starts. All Apex ...
Hemavantha Rajesh Varma Mudunu's user avatar
1 vote
Accepted

Aura Component + HttpCallout + Large File Response

If you go via apex, the heap limitations will apply. The workaround is to do a callout from javascript. Yes you can do that. By default, you can’t make calls to third-party APIs from client-side ...
Pranay Jaiswal's user avatar
1 vote

Callback method not getting called in Continuation Object

The callback method name mentioned in your continuationMethod1 method is processResponse, hence when a response is received it will look for processResponse method which is not available in your class,...
Vijay Ganji's user avatar
  • 6,566
1 vote

Continuation Apex Unit Testing - Lightning

I tried making few changes to your code and this may be a solution although it does require adding an additional method in your main class. Apex Class : public class ContinuationSampleCode { ...
Ezio's user avatar
  • 46
1 vote
Accepted

will Continuation works in Visual Flow?

If I read your question right, you are looking to find if Continuation will work in Visual Flow. Based on the documentation, and all available resources, the answer seems to be No. By definition, ...
Jayant Das's user avatar
  • 30.3k
1 vote

Continuation obj null in setContinuationMethod

You don't have to instantiate 3 different Continuation objects to test 3 different webservices. Only single instance of Continuation object will work. I have tried to replicate your use case using ...
Santanu Boral's user avatar
1 vote

Continuation Error: StatusCode=400

The issue was with the improper request body and hence I was getting error. When the request body is formatted properly, I am able to get the proper response.
NHK's user avatar
  • 91

Only top scored, non community-wiki answers of a minimum length are eligible