Skip to main content

Questions tagged [callout]

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

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

External callouts from Salesforce to third-party services that mandate IP restrictions

We make external callouts from Salesforce to a third-party - let's call them XYZ for this discussion. We currently use MuleSoft for for this integration - there's a Salesforce experience API and an ...
Ryan.Bartsch's user avatar
0 votes
0 answers
31 views

Can we put external credentials in a managed package? [duplicate]

I need to put a named credential and external credential in my managed package that I create. Furthermore, if not possible like this is it possible to create via the postInstall script??
Pogger Cheems's user avatar
0 votes
1 answer
83 views

"Unfortunately, there was a problem" error in flow builder

I updated my flow in flow builder and I am now getting this error systematically when executing the "Run asynchronously" branch of my flow: "Unfortunately, there was a problem. Please ...
iggy1977's user avatar
0 votes
0 answers
49 views

No subject alternative DNS name matching found

Trying to make callout to an authentication provider and get the access token which I would be using in the consecutive callout with another endpoint. Was working fine Initially with all the endpoint ...
Raj's user avatar
  • 1
0 votes
1 answer
107 views

Something's not right with the value in parameter body

I created a flow with an http call out action aiming at updating a custom field on a Jira issue. When trying to connect for schema, I'm currently getting the following error: [Error Message]: ...
iggy1977's user avatar
0 votes
0 answers
63 views

REST API call - cvent 401 error Code

I'm trying to write a CVENT REST API call in my code. According to the documentation, I'm sending all the required parameters. The same request works perfectly in Postman, but in my code, it returns a ...
SK2889's user avatar
  • 921
0 votes
0 answers
32 views

Retrieve all files of a folder from sharepoint

I'm trying to download all files from my sharepoint using GET https://{site_url}/_api/web/GetFolderByServerRelativeUrl('Folder Name')/Files Here is my code which makes the call : public static ...
ErtemSener's user avatar
0 votes
0 answers
33 views

What is the authorization token format in a callout using Named Credentials with the OAuth 2.0 Browser Flow?

I'm making a callout to our backend using Named Credentials with the OAuth 2.0 Browser Flow. After setting it up, I ran a test in the Developer Console. Here's the log: 15:49:02:346 ...
vctqs1's user avatar
  • 95
1 vote
1 answer
38 views

How to set scope in Auth provider for extending token expiry on JIRA server?

While setting up named credentials or Auth provider using OAuth2 for connecting to Jira on premise, The incoming link in JIRA is configured correctly and I am able to pull data but the session expires ...
goose's user avatar
  • 81
1 vote
0 answers
94 views

System.CalloutException: PKIX path building failed: unable to find valid certification path to requested target

Sorry for the unexpected appearance, I saw your profile on the forum dealing with the error: System.CalloutException: PKIX path building failed: sun.security.provider.certpath....
Banzoni's user avatar
  • 31
2 votes
2 answers
155 views

How to make a call out after every DML in batch

I recently faced this question in an interview where I was asked 'Can we make a callout in batch execute after a DML and if yes how?' I answered: Implement Database.stateful and make a callout in the ...
sfdcDev's user avatar
  • 67
0 votes
1 answer
218 views

How can I call the PokeAPI to get all the Pokémon at once?

I'm doing a practice assignment and was asked to use the Pokémon API to query and insert all of them at once. How can I achieve that? Should I use a Batch, a future method? The service only sends one ...
PanRancio's user avatar
2 votes
1 answer
188 views

Safely Storing Client Credentials in Salesforce?

I'm trying to integrate with an external system using Authentication provider and Named credential. For this, I've created an Auth. provider with just Auth URL, Callback URL and a plugin class. Client ...
sfdcnewbie's user avatar
1 vote
0 answers
53 views

Callback not executing after json deserialization

I'm running into a strange problem. The code is completing fine and sending the request/getting response back, handling the response correctly. I am just unable to show the "Success" toast ...
ThatGuy's user avatar
  • 85
0 votes
1 answer
91 views

Best way to update thousands of records with callouts in Salesforce

We import orders into a custom object in salesforce (goods_out__c). I'd like to update all our historic records, and new ones being created, with batch apex to populate information from an external ...
n34_panda's user avatar
  • 619
1 vote
2 answers
61 views

I want to write a unit test that can assert an enqueued job called a specific @Future function

To start, let's say I have this simple unit test: @isTest public static void shouldCallFutureMethod() { Test.startTest(); System.enqueueJob(myQueueableJob); Test.stopTest(); } Given ...
J. Dufresne's user avatar
1 vote
1 answer
51 views

Getting 'uncommitted work pending' even after putting in a queuable class

Getting 'You have uncommitted work pending. Please commit or rollback before calling out' error even after making the callout in a queuable class. Below the essence of the logic QueuableDummyclass.cls ...
Brav's user avatar
  • 820
0 votes
1 answer
102 views

Flow working in debug mode only (http call out)

I created the following schedule-triggered flow: It is well creating records without giving any error in debug mode. But live execution fails with the following error and no records are then created: ...
iggy1977's user avatar
1 vote
1 answer
147 views

Access Named Credentials with Guest User

I have created a Rest Service which accepts incoming Webhooks from Concur to notify Salesforce an Expense Report is ready. I am then using a Callout Class to fetch the Expense Report details from ...
Jeff Callahan's user avatar
1 vote
0 answers
29 views

'WebhookUtility' for job id '707Uo00000Krifj' : Callout loop not allowed

I have created this apex code for calling out to the client portal. it works fine, when test it on sandbox. But in Production it gives out error time to time : Callout loop not allowed This is the ...
Twopir Support's user avatar
1 vote
1 answer
240 views

System.CalloutException: Illegal character in opaque part [duplicate]

I've got a problem calling the below endpoint from apex. I created named credentials and auth provider to authenticate with the service and while executing the http request, I'm getting below error ...
CloudUser985's user avatar
-1 votes
1 answer
80 views

Unrecognized base64 character

I am getting the logs (2737691557)|FATAL_ERROR|System.StringException: Unrecognized base64 character: { (System Code) Class.docusignGenAndSendAPI.gen_and_convert: line 68, column 1 (2737703234)|...
TTT's user avatar
  • 11
0 votes
0 answers
37 views

How can I return the Slack slash command in Apex Salesforce with the Slack SDK in Apex?

I am working with the Slack SDK in Salesforce with Apex to handle Slash Commands where I want there to be persistence of what the user asks (/test create a new channel) this I want to keep as a ...
David Paucar's user avatar
0 votes
2 answers
428 views

How to add headers in salesforce HTTP Callout Flow

I have created one salesforce HTTP callout Flow referring POSMAN collection that my colleague gave me. when I debug it, it gives the following error. Callout failed for invocable action ...
Divyesh Jesadiya's user avatar
0 votes
0 answers
29 views

Best practice to deal with HATEOAS api callouts

I'm creating an connector between Salesforce and a ticketing system that exposes a REST API based on HATEOAS. I need to synchronize tickets everyday and insert/update them as Cases. Salesforce is ...
Yan Imensar's user avatar
0 votes
0 answers
55 views

Getting an intermittent script-thrown exception error when using compile + matcher with a regex

We have an old method that checks a string for an email format to determine what we'll append to it to make it a Salesforce username on user creation (subsequent step). This is called in a new method ...
sfdclazydog's user avatar
0 votes
0 answers
42 views

Is it possible to pass data from CRM analytics column to Lightning flows?

Based on below link: https://help.salesforce.com/s/articleView?id=sf.bi_dashboards_actions_configure.htm&type=5 I want to configure Custom action in CRM Analytics table where I want to pass data ...
SFDCDJ's user avatar
  • 1,904
0 votes
1 answer
32 views

Inbound and Outbound calls question

Can we make an outbound REST SYNC call when receiving an inbound REST call? External system 1 calls Salesforce Salesforce calls External System 2 Salesforce returns to external system 1 the answer of ...
stackusiastic's user avatar
0 votes
0 answers
37 views

External Service: Not able to select correct Apex Class in Variable-Type "Apex-Defined"

I create a flow in Salesforce and use the element Action to call an operation of an External Service. The External Service was created using an JSON OpenAPI Spec. 3 dynamic Apex Classes were created: ...
Frank Kern's user avatar
0 votes
0 answers
115 views

Get Presigned URL using named credentials

I successfully obtained the pre-signed URL to upload large file to aws s3 bucket using the method described in the article https://mtr-design.com/news/how-to-create-a-presigned-url-for-aws-s3-using-...
Mohamed Ashfak's user avatar
0 votes
0 answers
133 views

Unable to access token from an external callout through Apex

I'm starting developing on Salesforce, and want to retrieve a token from a client webapi to access another api. The client gave some access details to connect to their webapi. It looks like this : url ...
kabrice's user avatar
  • 129
1 vote
1 answer
68 views

I have a trigger that makes callout to external system in a future(callout=true) but does not run immediately. Where is this callout queued?

@future(callout=true) public static void makeCallout() { System.debug('Hello World-1!'); // Instantiate a new Http object Http h = new Http(); String endpoint = 'https://******...
Patrick Rantsho's user avatar
0 votes
0 answers
51 views

HTTP Callout in a flow to make a Marketing Cloud callout [duplicate]

Hello, I would like to call a Marketing Cloud API from a flow in Salesforce. I have 2 options, first is to use an invocable apex method (tested and it works fine). Second option is to use a HTTP ...
Oupat's user avatar
  • 733
0 votes
0 answers
39 views

Issue in setting values for a SOAP request in Apex

I am working on SOAP call where the request is sent to Mulesoft, in order to build the request I'm trying to set the values first by querying the Sobject, after which I am assigning it to the wrapper ...
bharath kumar's user avatar
0 votes
0 answers
131 views

Apex callout using multipart/form . JPEG works, PDF does not?

I have been working through setting up a callout using POST, using a multipart/form-data content type via apex. Currently just validating the request generation via a mock server hosted on postman. ...
api-testuser45690's user avatar
0 votes
0 answers
35 views

Test method throws Script-thrown exception during multi-endpoint callout [duplicate]

I have a test method that is throwing a Script-thrown exception at the line where a callout is being made. I am not sure what is the problem, I am using a mock class and validating which endpoint is ...
Mauricio.Ramos1979's user avatar
0 votes
0 answers
39 views

Why does the content version insert fail in a test?

I have a method that takes a contentVersion where the data is stored locally and does a callout to transfer it to sharepoint creates a new ContentVersion with a link to the sharepoint file to replace ...
Andreas Tschritter's user avatar
0 votes
1 answer
66 views

Handling Encoded Responses in Salesforce OAuth2 External Credentials

I'm dealing with a specific issue in Salesforce related to External Credentials with OAuth2 protocol. The main problem is that Salesforce doesn't properly accept encoded responses from our ...
Damecek's user avatar
  • 1,948
2 votes
1 answer
468 views

Named Credentials in Managed Package Apex Callout

I am trying to create a managed package that has a callout to a webhook. Very simple use case, when opportunities or accounts change we want our server to be notified. I have setup some Apex triggers ...
tubbytoad42's user avatar
0 votes
1 answer
76 views

Salesforce System.AsyncException - scheduled class calls Queueable apex do a callout and then calls batch apex

I have a schedule apex class that calls Queueable apex which calls a class that do a callout and then execute batch. I receive System.AsyncException: Database.executeBatch cannot be called from a ...
Muhammad Refaat's user avatar
-1 votes
1 answer
173 views

Can we do a callout inside for loop in batch class

Callout class Public class calloutValidation{ public static string CalloutCheck(String Email{ try{ //There are some logic HttpRequest req = new HttpRequest(); ...
SFL's user avatar
  • 1
1 vote
1 answer
117 views

http call out to an external REST webservice

Simple use case - make a http call out to an external REST webservice. Parse the JSON response. I know I could do this using Flow, but due to the business requirement have opted for Apex Class. Can ...
Cloud Rizon's user avatar
1 vote
0 answers
322 views

How to properly write custom header formula in External Credential?

I need to make callout to the Hotel Beds api. For an authentication headers I used External Credentials custom headers. But it is not properly creates headers(I guess). Hotel Beds requires following: ...
Ефименко Владислав's user avatar
0 votes
1 answer
276 views

Unable to fetch accountId of User in Test class

I am stuck in scenario while writing logic for my Test class. I am not able to access Contact.AccountId of User created in test case. I have created a TestUtility class for creating the community user....
user15754268's user avatar
0 votes
1 answer
134 views

How to send a callout request with Post method using JSON?

According to documentation, the setBody(body) method uses String in the param. But json is a string. If I have a body that I can successfully request using postman with json, how come I'm getting an ...
Kato's user avatar
  • 1
0 votes
0 answers
37 views

@future(callout=true) AppExchange Package is Deprecated, Details: The AppExchange package has been deprecated and can no longer be installed

I'm experiencing an issue when trying to make an asynchronous HTTP call within an Apex Trigger using the @future(callout=true) annotation. The objective is to trigger a package installation via an ...
vctqs1's user avatar
  • 95
1 vote
1 answer
117 views

GCP created SObject is not immediately available in apex

I have a lwc component, in that, when clicking a link it will do a rest callout to GCP. GCP side will handle the callout, insert an SObject into salesforce, then return the newly created SObject id in ...
Lance Shi's user avatar
  • 13k
1 vote
5 answers
813 views

Scenarios to use Platform Events

I was wondering, what are scenarios that are dedicated to use Platform Events? Documentation says for example - integrations between Salesforce and other external systems. But, I was participated in a ...
Łukasz Franczyk's user avatar
0 votes
1 answer
110 views

Can We Dynamically Create Accept Header In External Credentials

We have an External Service which uses different accept headers based on the operation such as: Operation1 - application/op1+json Operation2 - application/op2+json Operation3 - application/op3+json ...
ddeve's user avatar
  • 1,606
0 votes
0 answers
49 views

Test class for @future method called by trigger not working (Methods defined as TestMethod do not support Web service callouts) [duplicate]

I have a trigger on Account that makes a call to an apex class: trigger AccountAddressTrigger on Account (after insert) { Id patientAccountRecordTypeId = [SELECT Id, RecordType.DeveloperName FROM ...
happyLion's user avatar

1
2 3 4 5
27