Questions tagged [callout]

"HTTP Callouts" connect to a remote web server from Apex code.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Salesforce Integration with ERP (D365) using REST API [closed]

I am new to Salesforce and looking for your advice in making an Integration between Salesforce and D365 ERP application. We need to schedule batch send the data from the Salesforce to D365. From D365 ...
0
votes
0answers
32 views

Not Found / Forbidden error while using GET Operation in AWS S3 folder

I'm trying to get a csv file from a AWS s3 bucket, I've access to bucket and some of the folders in it. But i'm unable to access("GET") files from one of the folder. I get an error NOT FOUND"/404 when ...
0
votes
0answers
21 views

Error in moving audio content to azure retrieving with apex callout

I am making a callout to a 3rd party to retrieve an mp3 file The endpoint is a HTTP GET (https://media.ringcentral.com/restapi/v1.0/account/~/recording/RECORDINGID/content) The response is the actual ...
1
vote
2answers
51 views

How to correctly construct a TestClass for an API Rest Callout | Getting the error “Method does not exist or incorrect signature”

Apex Class for REST Callout public with sharing class FindAnApprenticeship { public class Payload{ @invocableVariable(label='Find An Apprenticeship URL') public String ...
0
votes
0answers
22 views

Formatting data on a lightning component without using lightningrecordform

So, I am currently working on a call out to another service outside of Salesforce. I have made the call out and am successfully returning data from the service outside Salesforce. So, my question is ...
1
vote
0answers
31 views

'uncommitted work pending' callout exception thrown in *tests only*

I am converting a lead in the Execute method of a batch class, then making 2 callouts with those results in the Finish() method. It works gloriously and throws no errors. However, in the test ...
-3
votes
0answers
22 views

this is my apex class help me to write test class for this,thanks in advance [duplicate]

public static decimal Httpmethod(decimal USD) { Http http1 = new Http(); HttpRequest req1 = new HttpRequest(); req1.setendpoint('https://api.exchangeratesapi.io/latest?base=USD'); ...
-1
votes
1answer
18 views

Test Class For Http callout Post [duplicate]

Kindly Provide me a feasible solution to write the test class for this below code` public class ActiveCampaign { @future (callout=true) public static void createUser(String Email, String FirstName, ...
0
votes
1answer
18 views

Integrate Salesforce with Active Campaign

I want to integrate salesforce with ActiveCampighn using the Api key and Url of ActiveCampighn through Http Post method. I want to create a contact from Salesforce to Active campaign. I tried with the ...
-1
votes
1answer
24 views

How to process the raw response generated by the WSDL2Apex Callout?

I am getting a huge chunk of raw response from the WSDL2Apex web service call out and I want it to be able to be processed into APEX Data structures, i.e. lists and maps. Raw Response Snippet: ...
0
votes
2answers
68 views

How to use Promises / synchronize two asynchronous methods in Lightning Web Component(LWC)?

In LWC JS, I am making an external API call-out and an Apex method and accumulating the results. How to synchronizes the process? Example: renderedCallback(){ let a,b; getApiResult().then(...
1
vote
2answers
62 views

Logging Solution for Force.com Public RESTful webservice

I've created a public site with a RESTful service mentioned in this blog, however this site uses Guest User License and I can't see any debug statements when this webservice is used by Postman. Is ...
2
votes
1answer
69 views

Named Credential Authentication [duplicate]

I am trying to connect with Xero using Named Credentials. I am using oAuth2.0 authentication protocol. I have created a Auth. Provider and Named credentials as shown in the image below The Named ...
2
votes
0answers
23 views

Salesforce External Service - Capturing Request and Response

We are doing POC to use external services for integrating with external systems. It works well.With spring 20 as per preview release notes enhanced external service is going GA. Question: Is ...
2
votes
1answer
38 views

Source of an erroneous “You have uncommitted work pending” error in Test?

From the top, I do understand how "You have uncommitted work pending" errors happen, but the following is very strange behaviour from Salesforce... It seems that for one org we have, creating an ...
2
votes
1answer
59 views

What is best Option to store Access Token, Refresh tokens?

Platform cache : I am using platform cache but platform cache is not returning anything after very small period of time ( approx 30 sec- 60 sec ). Custom Setting : Custom setting has a limitation of ...
0
votes
1answer
44 views

Timeout Error: You have uncommitted work pending when Queueable is being called from trigger

I have a class with @future method: public without sharing class SubmitOnApproval { @future public static void oppRecordsToSubmit(id oppId){ Opportunity o = [select id, ...
0
votes
0answers
32 views

Bulkifying a trigger or send everything in a Future method (with a callout inside)

I would like to anticipate a "mass update" of my accounts. I need to bulkify my code which contains a Callout. What happens when a mass update is done ? Like importing a list of account. Is the ...
1
vote
1answer
42 views

How can I use queueable Apex instead of a future method with arguments?

I have an @future class, SubmitOnApproval which is called when an opportunity is approved. This class is below: public without sharing class SubmitOnApproval { @future public static void ...
1
vote
1answer
139 views

Salesforce to Xero integration using Named Credentials by OAuth 2.0

I am trying to do the integration between Salesforce and Xero by using Named Credentials (Authentication Protocol is OAuth 2.0). I created an Auth provider - Then created Named credentials of OAuth 2....
0
votes
1answer
33 views

How to remove dom response from a loop

I have a dom class handler which I am calling from batch class. I am looping through the response to perform dml operations across certain objects. Since I have to use the response across different ...
0
votes
0answers
20 views

Scheduled Class within a Batch Class

I am trying to schedule a callout from a scheduled class. In order to get around the limitation of sending callouts from scheduled classes, I tried to include the scheduled class within my batch class,...
0
votes
1answer
34 views

Should I use a single callout with a list or mulitple callout for each Account?

I wanted to Bulkify my code to be able to update/create a long list of account for which I need to callout to my api. I know that I can't do more than 50 callouts per future methods. But using ...
3
votes
1answer
29 views

Callback method is not getting called in continuation object

I am getting invalid session Id when i try to perform callout using continuation api . If i remove continuation api code and perform a normal callout the the same code is working. Below is the code @...
0
votes
1answer
50 views

The following exception has occurred: IO Exception: Unable to tunnel through proxy. Proxy returns “HTTP/1.1 503 Service Unavailable”

We have a batchable Apex job (process) where we call an external web service for some Accounts. It starts and service is called. Then, for some records it we get the error : Unable to tunnel through ...
0
votes
1answer
30 views

Using Python as backend to Salesforce App

Python has some amazing libraries that I want to take advantage of. The only issue that I am concerned about here are the governor limits for long running operations. I am creating a deduping app and ...
0
votes
1answer
46 views

Accessing data of Sandbox from Scratch Org

I want to be able to query, insert and update records of a Sandbox from a Scratch org, only during the development phase. I know that scratch orgs are meant to be populated with just a little amount ...
1
vote
0answers
26 views

Correctly Write Test and Callout test on trigger [duplicate]

I have a trigger on Account after insert and after update. In both cases I need to call my BUS to update in the compagny database. Since I will have to deploy my dev into QA I need to write a test ...
0
votes
1answer
35 views

validate callout payload at webservice? [closed]

I am making a callout to web service. How can i validate payload received from callout at web service endpoint. is there anyway to authenticate that request actually came from salesforce only?
1
vote
1answer
34 views

SFDX plugin to generate Apex classes from Swagger file is failing to install

I'm trying to install this plugin https://github.com/muenzpraeger/sfdx-plugin , due to some reason it is failing. Please let me know if there is any other way that i can generate classes using swagger ...
1
vote
1answer
28 views

Get Request Submitting as a Post Request

i am sending a GET request to a spring boot backend api, but i keep getting a 405 error, POST method not allowed my code is public class TextingSolution { private final Contact xReceiver {get;set;...
0
votes
1answer
33 views

Composite REST Resource Not Found

I created a composite REST to insert opportunity for existing account, but all the GET method return error resource not found.. someone help { "allOrNone" : true, "compositeRequest" : [{ "method" ...
0
votes
1answer
14 views

TestMethod Doesn't Support Web Service Call Out Error For Trigger on delete

I have this trigger which deletes the Specific Objects records on delation of a record. I wrote a test class for this but since I am a toootal Noob, I was unable to manage to cover the whole thing and ...
0
votes
0answers
38 views

Multiple callouts dependant on each other in an InvocableMethod

I have an InvocableMethod apex function being called from Flow in which I make a total of 8 Web Callouts. They are all dependant on each other - so web callout 2 uses params returned by web callout 1 ...
1
vote
1answer
36 views

Error when pulling PDF from HTTP response

I have a question regarding this post: handle PDF content in HTTP callout When I try the above code I'm getting this: "Unrecognized base64 character: %" The logs show this as well: 19:53:04:658 ...
0
votes
1answer
35 views

How to get the value of a blob as a string in Apex?

I'm building a Google Drive integration to push files over. I have it working--with one significant problem. When I query VersionData from ContentVersion it return a blob. When I pass my blob in the ...
1
vote
1answer
38 views

How do I fix an invalid request in JSON format?

I'm trying to send and SMS through serwersms and creation a Callout with JSON. This request works fine: https://api2.serwersms.pl/messages/send_sms.json?username=LOGIN&password=PASS&phone=...
1
vote
0answers
31 views

HELP API Callout error uncommitted work pending for bulk update

I created a batch class that calling an API and then update the records. This batch running every 5 minutes. And there`s a custom button, if I click that custom button, the batch will run only for ...
0
votes
1answer
37 views

Future methods do not support parameter type of Map<Id,SObject>

I am calling a method from a trigger that makes an external rest api post call. I am creating my json like this and trying to use the setBody() method, but getting an error and I am not sure how to ...
0
votes
1answer
27 views

Using Named Credentials with Password Authentication Protocol

I'm trying to make a callout using named Credentials and my Authentication Protocol is Password Authentication. But I'm getting Unauthorized status. I'm not sure if I'm missing any parameter or ...
0
votes
0answers
14 views

Test class for multi HTTP callouts [duplicate]

I am making a callout to get access token as first callout and then making subsequent callout with the use of the access token. I am making use of StaticResourceCalloutMock for the test class but I am ...
0
votes
1answer
87 views

How do I go about adapting / updating this API trigger to work on both record Insert and update? (Currently it only works on record creation)

I'm just getting to grips with Apex and trying to get an API working with Open Weather Map API. Currently, the API Trigger I use only runs on record creation and it works great. But, I would also like ...
0
votes
1answer
53 views

How do I use REST API on a Trigger to populate account fields

I'm new to working with API's and code in general, I have been challenged to create an API to collect data to input into Salesforce records, this will be invoked by a trigger. Currently, I'm running ...
1
vote
0answers
32 views

Callout Exception when testing

I use a webservice to validate government info on companies. This is used for accounts and Cases. For some reason I'm getting this calloutException but there's no DML before the callout. I'm getting ...
1
vote
1answer
16 views

How to dynamically wait until external SOAP Web Service Return a response

I've built an external SOAP Web Service that takes several minutes to complete, I need to do some logic depending on the Service Response. Should I set a large timeOut value? Is there a way to use ...
1
vote
0answers
77 views

Web service callout failed: WebService returned a SOAP Fault: System.Web.Services.Protocols.SoapException: Server was unable to process request

I am new to Integration Projects. I have an Apex class generated from the WSDL of a third party. I would like to utilize the methods of that Apex class and write a batch class that utilizes the ...
1
vote
1answer
48 views

Run a batch after callout is finish

My process - I have a process in which I send data to outer system - and get a JSON to insert into Salesforce. This is handled by a scheduled class once a week. The Received JSON: - (Could be ~7K ...
0
votes
1answer
39 views

Visual Flow and Callout

I have a small problem with visual flow. I try to execute callout in flow through @InvocableMethod but before this callout, I do update a record(standard update action in Visual flow not in apex code(...
1
vote
3answers
182 views

Call toast notification in LWC from within fetch method

EDIT: I originally left out a part of my code which I thought was irrelevant to the question but on further investigation realized it was the source of the issue. Adding it in and then will also add ...
2
votes
2answers
141 views

How to use Limits.getCallouts() in a test class for a callout in a future method

After a bunch of research, it appears this is not possible, but I'm hoping someone here has found a way. I am using a before update trigger on Opp to call a class which contains a future method with ...