Questions tagged [callout]

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

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

Salesforce Flow Invokeable Apex making correct API call while debugging, as soon as I run the flow from custom app it doesn't work

Following code, works fine when invoked by the flow while in debug mode, but as soon as I run the flow in custom app it doesn't work. global with sharing class GovernorLimits { private class ...
0
votes
0answers
41 views

How to use external api using apex triggers [closed]

I want to trigger an event when a job is created. It should create this job in the livehire too. This is my class where I am getting access token public class _Token { @future(callout=true) ...
0
votes
0answers
32 views

How to check if AWS S3 folder is empty via Apex callout [closed]

looking for help with deleting empty folders from AWS S3 bucket I have a Apex class which makes callouts to download and delete files from an AWS S3 folder using HTTP Request. I would like to delete ...
0
votes
1answer
18 views

What are the per hour or per day governor limits for a managed package app ? are they different from unmanaged apps?

I am developing an app which I plan to publish via App Exchange. The majority of feature of this app will be through HTTP callouts , and these can go in the range of thousands. So what I need to to ...
0
votes
0answers
56 views

How to use Named Credentials in a Basic Auth callout with API key?

This initial code works perfectly to do a Callout with UN, PW and API key in Custom Settings. But this is less secure and so I want to move teh UN & PW to Named Credentials. but it fails. This ...
2
votes
1answer
155 views

Named credential JWT is not appearing in Authorization header in callout

I've configured a Named Credential to use the JWT authentication protocol (not JWT Token Exchange), but when the component makes a call to my service using the named credential, I don't get the JWT as ...
2
votes
1answer
56 views

Map.get(key) returns null

I am working on a callout that returns info about the Asset object. Based on the response payload, I need to check whether a corresponding asset exists in SFDC or not. If an asset record exists and if ...
3
votes
0answers
33 views

SandboxPostCopy callout throws UnexpectedException

When I attempt to perform a callout from a SandboxPostCopy class when creating a sandbox, it throws the following UnexpectedException: System.UnexpectedException: Attempt to release db connection when ...
-3
votes
2answers
33 views

Create record based on JSON from external system [closed]

Please hint me how to implement the following. The external system sends a JSON file containing information about the custom object to SF. I need to create records based on this JSON file. What do I ...
3
votes
1answer
73 views

Why would a future method not show up in debug logs?

What are some possible reasons a future method wouldn't show up in the debug logs? @Future(Callout=true) global static void myFutureCallout(Id testId){...
0
votes
1answer
108 views

How to process large volumes of records with callouts?

My client needs to import PDFs from Dropbox, match them to an invoice (where filename without suffix = field reference on invoice object), and attach to the appropriate invoice, then move the Dropbox ...
1
vote
1answer
78 views

Calling Future Method From Trigger

I am pretty stumped - I have a trigger on a custom object that calls a helper class that calls a future callout method. When I call the trigger, the helper class is called but I can't seem to get into ...
0
votes
1answer
35 views

Single record callout to run once in the near future

I am trying to find the best solution to my problem below and I'm feeling like my current solution can't be the easiest way to go about it. Let me know if I'm missing something or if this does sound ...
0
votes
0answers
9 views

Resubmit Failed SMS Messages on Cases

I have a custom implementation where after a Case is assigned to a team or is closed, a custom SMS Message should be sent. So, i will implement this using a triggered automation tool (either record-...
0
votes
0answers
11 views

App build on top of Salesforce : scaling and performance

Those in dev and QA working on SF app built on top of SF, How you do check and make sure that code is able to handle the scaling and performance and apex limits and callouts limits and all. do you ...
0
votes
0answers
22 views

JSON.serialize is NOT including NULL values regardless of suppressApexObjectNulls value [duplicate]

I'm trying to send an object's data out and I need it to include fields with null values. It is losing those fields when I serialize the object with the following code: for (Opportunity opp : Trigger....
0
votes
1answer
31 views

Error While POSTing to a third party PDF and additional parameters

I am calling a rest api with multipart/form-data content type. I need to pass a pdf and additional parameters to generate a pdf. The appends the additional params data to the pdf and generate a new ...
1
vote
2answers
77 views

Tooling API - Get all Active Workflow and Validation Rules

I would like to find all active workflow rules and validation rules for a specific object, ultimately with the aim of deactivating and later reactivating. I have looked at using the Tooling API but ...
0
votes
0answers
46 views

"You have uncommited work pending" when there's no obvious DML?

I have a RestResource which is running some callouts, as well as running some DML (after the callouts). I'm recieving this error: You have uncommited work pending. Please commit or rollback before ...
0
votes
1answer
61 views

Callout not happening from Continuations class(LWC)

I am trying to do a callout on a button click from my LWC comp using apex Continuations. In the debug log, I see no callout happened. But when I do the callout using setTimeout(), then its working ...
0
votes
0answers
40 views

How to Scan External callouts( APIs ) in OWASAP ZAP

In my environment, I have used a couple of external APIs I need to scan in OWASAP ZAP OWSAP ZAP for security review. it is possible another way to Scan Callouts Api and generate reports? I have ho ...
1
vote
0answers
32 views

Resubmit API Callout from Queueable method

I am working on an assignment where I need to process some subscribed events in Salesforce when a third party system publishes an event. The third party system publishes an event when there is a ...
0
votes
2answers
48 views

Queuable Apex callout

Requirement is to loop through set of records(could be in 1000's) and make a REST callout to process those records. I did went through multiple Q&A posted in the community but still stuck with it. ...
1
vote
4answers
166 views

Avoid making 2 callouts for the same record

After a record is updated, i need to perform a callout to an external system, in order to synchronize the data. For that purpose, i have created a record-triggered flow for my custom object that: ...
0
votes
1answer
54 views

Question for confirmation: Callout from Trigger using Platform Events

After a record is updated in Salesforce, i need to perform a callout to synchronize data to an External System. Ideally, i would like to do this kind of synchronously, however it doesn't seem to be ...
1
vote
1answer
42 views

render page visible only after apex callout function runs

I'm working on a system that uses a LWC modal to verify someone, once verified the full account record page displays. However, we've started to notice a bug where occasionally, if the person is ...
1
vote
1answer
32 views

How to push individual record data to external DB via Quick Action button via LWC?

LeadCalloutToDB Apex: public without sharing class LeadCalloutToDB{ @future(callout = true) @AuraEnabled(Cacheable=true) public static void callDBgateway(String recordId){ ...
0
votes
0answers
14 views

How to use PHP array in Apex for API callout [duplicate]

I am trying to access an API through Apex, but the API documention shows the credentials being sent in a PHP array or a C#/VB.Net Byte array. The sample PHP code provided in the documentation shows ...
0
votes
1answer
105 views

Payment Gateway Authentication

I am trying to setup B2B Commerce Payments to use a Cyber Source Payment Gateway that I have already implemented but am having issues with the authentication. The Cyber Source API that my Payment ...
5
votes
2answers
250 views

DML Error on new Asynchronous Record-Triggered Flow

We've recently developed a record triggered flow that retrieves data via callout when a certain field is set, using Salesforce's new Asynchronous Record-Triggered Flow. The issue we're having is, that ...
-1
votes
1answer
66 views

Iterate through API response to check for headers and index

In my Apex class I'm making a request to an API to retrieve data. The API returns the data in the form of a CSV string. Apex: public static String callMyAPI() { HttpRequest ...
4
votes
2answers
394 views

How to avoid System.AsyncException: Maximum stack depth has been reached [duplicate]

I need to consume an API from an external source and insert it in my Enterprise org. I have to retrieve 200 at most in every transaction. I implemented a Queueable Apex class that chains itself in the ...
0
votes
1answer
53 views

How to change FontSize Using Docusign's SOAP API and WSDL2Apex?

Salesforce's WSDL2Apex tool skips big sections of Docusign's WSDL file, including all font information. I confirmed this with Docusign. I recreated the FontSize enum as follows but it's not working. ...
0
votes
1answer
17 views

How to remove all unicode characters from a blob?

I have a requirement to parse the contents of a csv blob which has unicode characters. When I am trying to parse it using Blob myBlob = EncodingUtil.base64Decode(response.getBody()) I am getting an ...
-1
votes
1answer
291 views

How to parse a CSV file into JSON using APEX?

I am getting a CSV file as a Blob in response to one of the callouts. I need to parse this CSV file and convert the contents into a flat JSON structure. Is there an inbuilt way to parse CSV in apex ? ...
2
votes
1answer
87 views

Apex Tricky JSON Wrapper

Working with a fairly nested JSON response and I can't figure out how to access the list variable for a returned response. Here's the response JSON: { "response":{ "code": &...
0
votes
0answers
30 views

Apex Callout to Yahoo Geolocate redirects endless even though it works with Postman

I am trying to connect to 'https://gws2.maps.yahoo.com/findlocation?pf=1&locale=en_US&gflags=R&diagnostics=true&format=json&q=PariserPlatz+Berlin+Germany+10117'. Doing this in ...
0
votes
1answer
28 views

REST DELETE Call To External System Returns Status Code 0

I have a REST API call that I'm trying to make using a DELETE method. However, the request is returning a status code of 0 with nothing in the response body. If I take my endpoint and run the request ...
-3
votes
1answer
82 views

inserting records using Apex Web service [closed]

The user has access to apex class.I am trying to insert accounts using apex web service. and making a callout using apex. This is my code.but it seems that the apex web service is not receiving the ...
-2
votes
1answer
45 views

How do I resolve the following error "You have uncommitted work pending. Please commit or rollback before calling out [duplicate]

This is my code at the moment, the API is only set to receive the ID's one at a time (if this is a major thing I can ask for this to be changed) so that I can send them in a batch instead. Also any ...
0
votes
0answers
266 views

Origin has been blocked by CORS policy

I understand there are lots of questions and answers related to CORS policy, but here I wanted to make sure if I'm understanding it right and solving it the right way. I have a visualforce page that ...
1
vote
0answers
13 views

Approach to Map Inbound Web Service Request Fields to a Defined Wrapper Class?

We have multiple external systems POSTing callouts to a salesforce custom web service. We need an approach to map the request fields from these external systems to a generic defined wrapper class. We ...
0
votes
1answer
106 views

How to generate payload for below JSON structure and wrapper class

JSON File for upload JSON for file upload { "files": [ { "name": "my file.txt", "data": "...
2
votes
1answer
160 views

Refactoring Apex synchronous callout to asynchronous

I'm refactoring a Visualforce page, which currently gets data from a synchronous Apex callout, so that the callout will asynchronous. The Visualforce page downloads a .csv file with customer data in ...
0
votes
1answer
76 views

Trying to convert Datetime to a certain format yyyymmddHHmmss

If System.now() returns 2021-09-06 19:50:23 and the output string that I want to send is 20210906195023 for some reason I tried capturing this datetime as a string but to force a format messes up the ...
0
votes
0answers
29 views

Batch rest callout error handling

I have some batch which making a post request with token and i want to handler error. Its easy to handle execute method, but can i handle errors in start with getQueryLocator?Also how can i handle ...
0
votes
1answer
67 views

Is that possible to call batch class from trigger for more than 2K records to do callouts?

We want to do call to batch apex from trigger. And in that batch apex class we want to do callouts. So we are giving batch size 50 in scope parameter. but we have more that 2K records which we update ...
0
votes
1answer
142 views

The Test.isRunningTest() function is not working

I am using if(Test.isRunningTest()) condition to set the response code to 200 for code coverage related to my HTTP callout class, so that the success scenario gets covered. But in the coverage details ...
-2
votes
1answer
40 views

Check if upsert necessary

I am using external id and rest callout to another org, but is there a way to check if i need to make callout? Cause callout called even if all fields are the same. I can compare all fields, but its a ...
2
votes
1answer
96 views

I receive an empty list of notifications using the Connect REST API endpoint: /connect/notifications

I want to get all the current user's notifications to display them in a LWC component. For this, I tried to make a REST API callout from Salesforce to the same Salesforce org using Connect REST API ...

1
2 3 4 5
23