Questions tagged [callout]

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

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

How would I resolve a 429 error that does multiple api callouts from a scheduled class that calls multiple instances of a Queueable class

I have a scheduled class that calls a Queueable class which does an api callout. What seems to be happening is once the scheduled class is done setting up all of the queueable classes to run, they all ...
0
votes
1answer
36 views

callout inside for loop [duplicate]

I am inserting multiple records in a transaction then i have to send those details to another system. Currently after inserting i am querying the records in a list and inside for loop doing the ...
0
votes
2answers
30 views

System.JSONException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

public class CurrencyConvertorClass { public static Decimal convertCurrencyToINR(Decimal eur){ Decimal inr = 0.0; HTTP h = new HTTP(); HTTPRequest req = new ...
0
votes
0answers
17 views

Named Credential Authentication Error

I am trying to connect with Named Credentials. I am using oAuth2.0 authentication protocol. I have created a connected app ,Auth Provider and Named credentials as shown in the image below Error, the ...
0
votes
1answer
38 views

How to set Session ID in the authorisation Header using Named credentials Salesforce

I am trying to make REST Tooling API callout and I want to send Session id in the Authorisation Header. Thru apex we can send the Session ID in the Header but if I use Named credentials to store the ...
0
votes
0answers
16 views

Change data capture event not firing associated trigger in production

I have a custom trigger that fires on an OpportunityChangeEvent: trigger EXAMPLE_CREATE on OpportunityChangeEvent(after insert) { // Get the change event’s product ID for added and updated products ...
0
votes
0answers
44 views

Weather API callout issues

I am currently working on creating a prototype LWC that gives weather information for a given location. The location is being provided via user input. For some cities, it works fine - as in the case ...
0
votes
1answer
28 views

Update record in rest callout

Hi I try to update an existing record using REST callout. String uri = 'https://test--dev.my.salesforce.com/services/data/v25.0/sobjects/Account/' + ACCId; HttpRequest reqUpd = new HttpRequest(); ...
5
votes
2answers
202 views

How can I share state between 'Queueable' executions?

I am developing a Queueable class to send data to an external system via HTTP callouts. I am planning to chain this class to call itself multiple times, until all records have been processed, or until ...
-1
votes
1answer
39 views

Is it possible to add a Real Time Stock Tracker to a Salesforce home page? [closed]

Is it possible to add a Real Time Stock Ticker to a Salesforce home page using the following ticker symbols? S&P 500 (^GSPC) Dow Jones Industrial Average (^DJI) NASDAQ Composite (^IXIC) Russell ...
0
votes
0answers
97 views

Post File to SharePoint from APEX

I am using EinsteinVision_HttpBodyPart approach to create a file in Sharepoint from Salesforce. EinsteinVision_HttpBodyPart And consuming it in my below method, with this approach files are creating ...
-2
votes
1answer
60 views

Salesforce to an external Service callout using JWT [closed]

Hi Community Members, The ask is to call a service, from Salesforce that will accept only requests that are based on JWT. Precise wording is Salesforce sends an encrypted JWT object containing the ...
0
votes
1answer
26 views

Unable to use @future(callout=true) method in Apex class

1.Currently working on Apex with the flow to pass the API data. 2.If I use @future(callout=true) in apex it throws an error like below. Error: The only annotation that can be used with ...
1
vote
2answers
39 views

How to resolve INVALID_SESSION_ID error on fetching Tooling API data

Using the Tooling API I need to fetch All Workflow rule Details. My below code work perfectly on the developer console Anonymous Window, but in LWC when I envoke the method with @wire shows me an ...
0
votes
1answer
26 views

Webservice callout in Apex component used in EmailTemplate thrws Programmer Error: transaction committed or rolled back while performing api operation

I have an email template which I need to build using many information , so I have used apex component <c:EmailTemplateComp ObjectID="{!relatedTo.Id}" show_url="false"></c:...
0
votes
1answer
26 views

Retrieve API name of all profiles

How do I retrieve the API name of all profiles that exist in a SF organisation? I can retrieve the API name of individual profiles via HTTP request: public static String getProfileAPIName(Id profileId)...
0
votes
1answer
42 views

How to allow an external system to update a field on quote object after a callout [closed]

I have a question please ,i did a callout (Rest) to an externel system ,i send some informations of a quote record ,when the response is ok ,the external system will update a custom field in my quote ....
0
votes
1answer
38 views

Question about Salesforce limits on API Callouts

I have to call a webservice from an external system each time a new record is created on Salesforce. The external webservice accepts a single record/object instance per callout. If I do an after-...
0
votes
0answers
26 views

Calling Webservice from Apex class, getting 302 response error

I have the below code trying to make a HTTP callout from a APEX class. The response I get back is System.HttpResponse[Status=Moved Temporarily, StatusCode=302] My class is public with sharing class ...
0
votes
2answers
57 views

LWC showToast not working after apex callout

Hope all you are really well! (have just signup here) I have LWC which is nested in an Aura component. I'm calling imperatively an apex method which executes a REST call: createClientOnMoloni({ ...
0
votes
1answer
65 views

System.JSONException: Malformed JSON: Expected '{' at the beginning of Map

I'm returning one JSON response from the rest API from another Salesforce instance. while deserialising JSON I'm getting System.JSONException: Malformed JSON: Expected '{' at the beginning of Map ...
0
votes
1answer
65 views

Callout from an LWC page

Hi Have a below code in apex Http http = new Http(); HttpRequest request = new HttpRequest(); string accessToken; request.setEndpoint(URL); request.setMethod('POST'); HttpResponse response = http.send(...
1
vote
1answer
36 views

Named Credential ignores authorization header in apex

I have created a named credential, myNamedCredential, where Generate Authorization Header is True. When I look at the codebase, we have a trigger with code that will set the Authorization Header using ...
0
votes
1answer
25 views

parameter max size limit for post call in APEX callout

I want to post some data to EHR in call out. The data I am having is nearly 5000 characters of length and it cant be split up. It has to be sent in single attribute named "Description". I am ...
0
votes
0answers
23 views

Invoking inter dependent callouts from a managed package

I have a requirement, where I have a scheduled apex which runs every 5 mins and invokes a future method of an apex class. This future method invokes a managed package method for making the callout. So ...
0
votes
0answers
6 views

Integrating with Google Publisher Query api

I am seeking some guidance as to how I can integrate with Google Publisher Query Api. Though some research I was able to get a wsdl from Google Developer playground, which I guess should be a starting ...
0
votes
1answer
29 views

To create the records in the object with the help of http response in rest api in lwc

I want to create the record with the help of response which has come from the serverside, now Iam able to get the response in the js and stringify the response but iam not able to match the fieldsto ...
1
vote
1answer
47 views

How to use Salesforce Private Connect for a European Salesforce Org

Salesforce Private Connect allows a completely private connection to be established between a Salesforce Org and AWS. I was trying to configure it between my Europe-based Salesforce Org and a London ...
0
votes
3answers
57 views

JSON structure for callout

I have been trying to achieve a JSON structure that looks very similar to this { "firstName": "uhfas", "lastName": "kkkjfi", "status": "...
0
votes
2answers
24 views

Missing return statement required return type: System.HttpResponse

I'm going through this trailhead module and, as a good newbie, I'm experiencing some issues in completing the hands on challenge. This is my AnimalLocator class: public with sharing class ...
0
votes
0answers
16 views

Rollback and/or revert Integration Values

I started working with Lightning B2B Commerce, and its Integrations and I'm not sure about error handling when one integration fails but not all (e.g. Tax fails but Pricing worked). I feel a bit ...
-2
votes
1answer
43 views

Setting REST Request Body [closed]

I need to set below request body in a http rest callout which is working fine in postman. [{ "notification_type": "complaints", "notification_mode": "push&...
0
votes
1answer
42 views

Pass trigger record values to Apex class for Http callout

I'm fairly new to custom development/coding in general. I've created some Stock__c records in my playground and am trying to update their price using an Http callout to IEX Cloud API. What I can't ...
0
votes
1answer
102 views

Apex csv file generation

Hope everyone is safe. I'm trying to generate a csv file using apex code. From salesforce I just want to take out all payments from payments object that have a status of Paid and then check if Number ...
0
votes
0answers
45 views

Apex error message: Internal Server Error when doing callout

I have a program to do external callout for which the process gets invoked by the apex trigger. A workflow to immediately update a field from 0 - 8 if X field was changed to Y value Then the ...
0
votes
1answer
60 views

JSON file size limit to be processed by APEX Class

not much experience with REST APIs or writing a code for it. I am working with our IT team and the plan is for them to write REST APIs on their end so that Salesforce can come in and request data (not ...
1
vote
1answer
27 views

How to use record data to trigger a webservice call and store result in field?

My flow is to have a trigger on the contact object, make a REST API to external service using the data from the contact record, get a reply and store the information back into the record. However, I ...
0
votes
1answer
28 views

Why am I getting a html table returned from GET callout in salesforce but not when using Postman?

I am trying to use this api to validate email addresses: https://developer.everest.validity.com/#bc0f96ba-bf72-45c3-82ed-36a2dc356e8a I have it working fine in postman. I get a 200 response and a JSON ...
0
votes
0answers
14 views

Methods defined as TestMethod do not support getContent call in test class [duplicate]

public static workOrderRecordFormApex SAPgetPicklistValues(string recordTypeId, string objectName,string fieldApiName){ Map<String, String> piclistValues=new Map<String, String>();...
1
vote
1answer
66 views

API calls in batch class's start method [closed]

Can we make API calls in 'start' method of batch class ?
0
votes
0answers
77 views

Timeout on SOAP callout

Recently I've been having the error IO Exception: Read timed out when doing a SOAP Callout. Looking at the error, I would need to increase from the base 10 seconds timeout, and searching the internet ...
0
votes
0answers
29 views

get values from ANY type Object [duplicate]

I'm having issues trying to extract values from object list, this is the flow: button gets clicked click calls a callout function get response from response.getBody() at this point, I have two ...
3
votes
0answers
52 views

Callouts to self Salesforce Org no longer need named credentials

Recently (In the last few months) I remember of reading in the Salesforce Release Notes (can not remember in which ones, though) that an enhancement was being introduced where, when you were using for ...
0
votes
1answer
25 views

API Request vs Callouts

Reference: Trailhead I understand that Apex callouts is a way to fetch data from external system. I am confused as to how API Request differ from Apex Callouts. Can someone please explain with example?...
0
votes
0answers
21 views

How to Capture Response from 3rd Party Application back to Salesforce in Canvas App?

Requirement: There's 3rd party application in our Organization which is used to upload the document. Once we upload the document in that application we want to fetch Document Id as Response back to ...
0
votes
2answers
68 views

Update a record in future method with JSON data [closed]

From process builder getting record id and pass that in to apex. Apex class to update the record: public class BacktoQuantum { @InvocableMethod(label='getdata' description='Get data ...
1
vote
0answers
26 views

Trigger with callout not updating a field on Case object

I have a future callout which is triggered after case creation/update. The callout sends a request to my backend to create a resource there, then, it returns the resource ID, and it should ideally add ...
0
votes
2answers
101 views

How can I update a record with information obtained from a @future callout?

I have a trigger which executes a callout on the Case object to create a resource in my backend. The callout returns the ID of the created resource, which should then be added to the Case the trigger ...
1
vote
2answers
90 views

Best practice for parsing REST API response [duplicate]

I am trying to connect to an external system via REST API. The below is the JSON response. {"coord":{"lon":-0.1257,"lat":51.5085}, "weather":[{"id":...
1
vote
1answer
31 views

Every HTTP request I send gives a 401 Unauthorized code

I'm working on a trigger that will send an HTTP request on some records creation/updates. I have developed the method the trigger should execute, however, every single HTTP request I send gets a 401 ...

1
2 3 4 5
22