Questions tagged [callout]
"HTTP Callouts" connect to a remote web server from Apex code.
1,280
questions
0
votes
0
answers
24
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 ...
-1
votes
0
answers
35
views
HTTPCall out request data is Invalid
I am doing a callout to Busness central endpoint . When I sent through Post man things are working fine but in APEX I am getting error as
<error xmlns="http://docs.oasis-open.org/odata/ns/...
1
vote
1
answer
96
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 ...
0
votes
0
answers
29
views
Integration with Dynamics 365 Business Central
We got new requirement to integrate with Dynamics 365 Business Central API.And below screen shot is from postman where in postman I can hit the BC and get the access token but I am trying to convert ...
-1
votes
0
answers
43
views
Facing System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable [duplicate]
I'm having trouble with the API. I tried hitting the endpoint with Postman and the browser, and it worked great. However, when I try hitting the same endpoint from Salesforce using Apex and an HTTP ...
-1
votes
0
answers
31
views
JIRA TO Salesforce Integration(One Directional) using Apex Rest API [closed]
I'm new to Apex Integration, We have a requirement to create OneDirection Integration from JIRA - Salesforce Integration using Apex Code.
Requirement :
1.JIRA - Salesforce (One way Integration) using ...
-2
votes
0
answers
38
views
Unit test is providing 23% coverage please help me to debug this [duplicate]
Unit test is providing 23% coverage please help me to debug this.
Batch:
global class UpdateAccountCustomerTypeBatch implements Database.Batchable<SObject>, Database.Stateful, Database....
0
votes
5
answers
116
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 ...
0
votes
1
answer
22
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
...
0
votes
0
answers
44
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 ...
0
votes
1
answer
52
views
Apex Callout - Use Named Credential Password Placeholder in setEndpoint [duplicate]
I've created an Apex class to call a custom rest api endpoint for a Snowflake database.
The call is pretty basic in that you just include the token and a query in the endpoint Url.
I would like to use ...
0
votes
0
answers
55
views
@Future method is not getting called. No logs, no exception no errors. When records are inserted through REST API call from an external system
Orders custom object have a lookup on Contact. Each Order will have a corresponding contact. A contact can have multiple orders.
When an order's is inserted through Salesforce or any tools for ...
0
votes
1
answer
56
views
Define an External Service that accepts application/xml
This is similar to How to use HTTP Callout action in Flow with body of Content-Type: application/x-www-form-urlencoded
I am trying to create an HTTP callout for a flow. The service I am calling is ...
0
votes
1
answer
63
views
Making a lot of chained API calls in Apex
I'm supposed to make around 1500 chained API calls in apex. This is the process: I want to get a list of courses of a semester from an external server, then for each course, I want to make a separate ...
0
votes
1
answer
26
views
'uncommitted work pending' even when all DML statements have been deactivated
Our system is pretty complex with DML statements, call-outs and future methods everywhere. After adding some more functionality, I ran into the dreaded 'uncommitted work pending' error. It had been a ...
0
votes
1
answer
96
views
403 Forbidden when making a multipart/form-data REST PUT API Call to Azure DataStore
As the title suggests, whenever I try to send an API request with a PUT method and a multipart/form-data as the content-type, to an Azure Data Store, I get a 403 Forbidden response back.
I am using a ...
0
votes
0
answers
44
views
How do I capture the Picklist Selected Event and write the code behind?
To everyone,
I'm new to SFDC, but I'm not new to development.
Here is what I'm trying to do:
1.) Place Picklist on the Lead page with values RDC and Wire - this is done
2.) Capture the Picklist ...
0
votes
1
answer
33
views
Number of Results does not match the number of interviews
OK, I feel stupid. I've seen other questions from people who got this same error, but none of those scenarios was like mine. So I'm still really confused. My Flow is sending ONE PropertyId to an apex ...
0
votes
0
answers
16
views
test class for get task records from zoho crm using apex? [duplicate]
HttpRequest req = new HttpRequest();
req.setEndpoint('https://accounts.zoho.in/oauth/v2/token?refresh_token='+reftoken+'&client_id='+client_Id+'&client_secret='+...
5
votes
1
answer
357
views
Best approach to make callouts from trigger
I have a requirement in which, for each time an account is inserted, I have to make a callout to an external system sending some data of the record and then the API returns a unique Id that I have to ...
0
votes
0
answers
57
views
Issue with exposing and consuming REST service between 2 orgs
I have two orgs, A and B.
Org A has some exposed REST services. Here is the code:
@RestResource(urlMapping='/pokemon/*')
global class PokemonHelper {
@httpGet
global static Pokemon__c ...
0
votes
0
answers
232
views
Callout failed for invocable action
I'm trying to set up a FLOW with an HTTP Callout "GET" request and I'm getting the below exception.
Info
Error Occurred:
Callout failed for invocable action
GetProspectLinkedinSearchTest....
0
votes
1
answer
74
views
Cannot see Http Callout in Flows
To turn on Http callout in flows, at first I have made an external credential with authentication protocol as custom.
After that, I have made a named credential, enabled it for callouts, and use the ...
0
votes
0
answers
77
views
Callout named credential calls with a blob body
I am trying to launch a callout call to an OCR from an Apex method using a secured named credential with an external credential.
The HTTP request is a POST request with multipart body containing a ...
0
votes
1
answer
33
views
Deserializing is giving null values from wrapper classes
Hi All I am trying to deserialize the below response but getting values null every time.
Wrapper class used
public class APIResponse{
public cls_InstantIDResponseEx InstantIDResponseEx;
class ...
-2
votes
2
answers
59
views
getting a 'Missing return statment required' even though i have one
I have a method:
public static String doCallout(String requestJson, String recordId){
HttpRequest req = new HttpRequest();
req.setEndpoint(END_POINT_URL);
req.setHeader('Content-Type', '...
0
votes
0
answers
18
views
Hi I need to write the Mock Test class for my webservice test class, i am stuck , please help me to create the mock call out in the APEX [duplicate]
Below my class:
@AuraEnabled
public static ExtendedABRJsonResponse getExtendedABRDetails(String searchNumber, Boolean isABN) {
ExtendedABRJsonResponse theDefaultResponse = new ...
1
vote
0
answers
44
views
HttpCalloutMock returning null response in Test class
I've a service class that makes a callout to specific endpoint inside a future method. The callout is made on after update trigger on Contact when a relevant field update is done.
@future(callout=...
-1
votes
1
answer
117
views
Create a JSON using Custom metadata type [closed]
I have a custom metadata which store some parameters which I need to pass in Post callout.I have stotred the Options in below JSON in that custom metadata
{
"email": "[email protected]&...
0
votes
0
answers
235
views
Oauth2.0 Authentication code generation from client id and secret in Apex code
I am not able to get the Authorisation code Oauth2.0 from Apex code, However i can get the same from Postman callout. Is it possible to get the authorisation code from apex? I am using the below ...
0
votes
1
answer
73
views
Convert or parse datetime coming from external system and save it in salesforce [duplicate]
I am calling a rest api and one of the attribute of the response is datetime which is in CST format(6/26/2023 7:01:50 AM). I tried converting to date time format but its throwing Invalid date/time: 6/...
0
votes
1
answer
115
views
Weird "common.apex.runtime.impl.ExecutionException: Syntax error"|0x78b85a0a while doing a Callout
I am basically sending a PDF as a binary file but the request is not going anywhere.
The stack trace is following:
23:24:18.100 (138575175)|USER_DEBUG|[28]|DEBUG|50977
23:24:18.100 (138583678)|...
-2
votes
1
answer
48
views
Can we build the wrapper to field mapping using the custom metadata for json outbound callout
Public wrapperdataclass{
class ContactWrapper {
public String comments;
public String firstName;
public String email;
public String country;
public String ...
0
votes
1
answer
420
views
External Credential's 'Principal' not allowing multiple parameters
I'm trying to use Named Credential to authenticate to an external API.
I'm storing the credentials(token and api-key) under 'Principals' in External Credential.
But I noticed that when I'm adding ...
-3
votes
1
answer
166
views
Send 1 Million records data to external system using batch class
I am trying to send the data to external system from batch class.. Where data include 1 million records.. I wrote below batch class.
In batch class I am making callout to the external system and ...
0
votes
0
answers
109
views
Impossible to get the Grouping columns (count) if the RowCount button from the UI in Salesforce report is Unchecked
I am hitting this rest API end point in Apex in order to get Salesforce Report Data.
String dash_url = '/services/data/v35.0/analytics/reports/'+repId+'?includeDetails=true';
It fetches me result and ...
-1
votes
1
answer
166
views
How to integrate or send files upto 2GB to SharePoint
We need to send files from Salesforce to Sharepoint with upto 2GB of a single file size. We are aware of Salesforce governor limits of Salesforce/Apex where it cannot process asynchronous API calls of ...
0
votes
2
answers
206
views
Is it guaranteed that First submitted Queueable or Batch class will run first?
We have to send case create and update data via API to third party.
For create case: In trigger we are collecting all the case ids in set and calling queueable class if cases created are less than 100 ...
0
votes
1
answer
25
views
LWC div don't working as expected once the value is atribuited via URL
I've created a LWC which takes some fields information from the URL and add to the expected variables, every other field worked fine except checkboxes, that is attributing the value but once I'm ...
0
votes
0
answers
39
views
Lightning Object Page Custom Button With No Redirect
I have a custom button that makes a callout. I know how to do this by creating a VFP and creating the custom button on the object with the custom URL, but I am curious if there is a better/ supported ...
1
vote
2
answers
178
views
Bulk API Query Job in Apex with big response
I have a task to query a million records from one org and then upsert them in another org. I use a Bulk API query job to get all records.
HttpRequest request = new HttpRequest();
request.setEndpoint('...
0
votes
1
answer
233
views
Making a callout from LWC or Apex
Most examples of implementing a callout as part of a LWC involve calling an Apex method that handles the callout and returns the response to the JS controller. What are the reasons we callout from ...
0
votes
0
answers
110
views
Get Refresh Token after callout failure
Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__c.
We are storing Refresh Token and Access Token in one record custom object Token__c.
We have one ...
0
votes
1
answer
537
views
DevOps Promotion Failed, how to change or delete?
Our team is using a DevOps Pipeline that starts from our individual sandbox, moves to an integrated sandbox, moves to a full sandbox, and then attempts to deploy to production. In my sandbox, I ...
0
votes
0
answers
105
views
Bank REST API Integration
I'm planning a personal project in Salesforce where I'd like to connect to my bank account and retrieve real-time transaction data as well as historical transactional data. This is to keep track of my ...
0
votes
1
answer
197
views
After Update and Insert Trigger with Future Method Causing DMLException
I'm trying to update a field on the account field with a trigger using after insert and update. I am using a future method to make a callout to a rest API to get the rate of BTC in USD.
My issue is ...
1
vote
1
answer
434
views
System.JSONException: Unexpected character ('S' (code 83))
I am trying to write a test class for my rest resource and I keep getting a failure with the above error message. I've seen other anwsers suggest that there may be a '' escape character in the text, ...
0
votes
2
answers
127
views
How to avoid nested for loop in this apex code?
public class TestUserData {
public static HttpResponse makeApiCallout(String endpointUrl){
HttpRequest request = new HttpRequest();
App_Id__mdt appid = App_Id__mdt.getInstance('appid');
...
0
votes
0
answers
38
views
Retrieve a list of records that are uncommited/pending
I am attempting to perform a callout using DocuSign's Apps Launcher managed package. Despite performing the callout in a Queuable, I am receiving the error message "You have uncommitted work ...
0
votes
1
answer
88
views
Best strategy to display API retrieved details on Salesforce record in real-time
I'm looking to utilize a rest api to retrieve details that I'd like to show on a salesforce record. Is it possible to show this info in real-time, for example when a page loads the API call is made.
I'...