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

learn more… | top users | synonyms

0
votes
1answer
22 views

callout error with out callouts in my class

Hi I have below class and test class. I am getting the "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out" error. can u please help me out. ...
3
votes
2answers
37 views

send a Report as a CSV/TEXT through HttpRequest

i am new to salesforce programming , and i am trying to send a file through HttpRequest to a 3rd party . the file i am trying to send is a report converted to csv format or text !! is there a way to ...
2
votes
2answers
35 views

Use System.runAs() in a Test Method for calling web service

Everytime I solve a problem, another appears. More than a problem, I would say a SalesForce restrictions. So, I want to test some code (which makes a web service call in order to display some data) ...
3
votes
1answer
41 views

Callout to web service doesn't work depending the profile I'm using

I have a customized button that once you click it, a new window it's open displaying some data from an external app, getting the data through a SOAP web service. If I'm logged as System Administrator ...
0
votes
0answers
11 views

OpenAir Link Update

I'm working to update a button on the Salesforce Opportunity that calls out to an instance of OpenAir and creates a new Project. I'm wondering if it's possible to pass the ID of a Contact within ...
-4
votes
0answers
21 views

How to send request in WSDL format

Having an issue pushing data from salesforce to external system , everything is ok but later I realized the salesforce is sending the data i XML format but the external machine which is middleware is ...
1
vote
1answer
61 views

Waiting for Response. Google Time Zone and GeoCode API

I am trying to make a TimeZone class that does the process to get a time zone. I am using the Google API's. In order to get the timezone you have to make a callout to the Google Geocode API and get ...
2
votes
1answer
39 views

IO Exception: Received fatal alert: handshake_failure

Its a callout ,Whenever I try to connect with Secured Gateway, it fails I have given then client certificate of salesforce env. Do you think Iam missing anything here .Please help
0
votes
0answers
15 views

LoadState() Method.

I have a question in regards to a LoadState() method I found. I have been trying to find some information after seeing this method on an Apex @future(Callout=true)class. I know this method exist in ...
2
votes
1answer
32 views

Dynamic endpoints in salesforce callout

Endpoints are always hard coded in remote settings and in the code, Is there a way that endpoints which I am hard coding can be dynamic . So that If Target System url changes , I need not to make ...
6
votes
1answer
75 views

Considerations for calling out to enterprise applications behind a firewall from salesforce?

If I'm looking to integrate an enterprise application behind a firewall with Salesforce, what considerations should I be making? From the architect certification study guide Given a scenario, ...
2
votes
1answer
32 views

Delete a ressource from cloudinary

I'm using cloudinary to store images. when I try to delete a resource, I get the following error message: HTTP method DELETE doesn't support output. my source code: Http h = new Http(); ...
0
votes
1answer
35 views

Clicking button it should reload the page, the callout must be perform asynchronous

My question is that clicking button it should reload the page, The callout must be perform asynchronous. Now its works like a reloading the page after finishing the callout. Custom Button : Execute ...
1
vote
0answers
33 views

Test Method for callout in Future method

I have a trigger on Account. On Account insert, I am sending a callout through future method. I am trying to write a test class for this but I am getting either of these two errors - 1) You have ...
1
vote
1answer
29 views

Unable to make web callout even after Database.rollback

Savepoint sp = Database.setSavepoint(); insert new Campaign(Name='test'); Database.rollback(sp); HttpRequest req = new HttpRequest(); req.setEndpoint('http://google.com'); req.setMethod('GET'); Http ...
0
votes
0answers
110 views

Http Request callout - Handshake failure (probably certificate error)

I have a server which i need to send a https request to. I do not receieve anything from Salesforce when trying this. I have tried another https server and it works fine. I get an error message: ...
1
vote
0answers
54 views

Can we callout and chain a Queueable class?

I'll jump right into some code: public class ChainQueue implements Queueable, Database.AllowsCallouts { public void execute(QueueableContext context) { if(QueueUtil.hasNext()) { ...
1
vote
1answer
67 views

Display webservice callout return data on a VF Page without saving data in records

I'm kind of new on Salesforce. I've built an Apex class that makes a callout to a webservice and I want to display on a VFPage the data that the callout returns. I've just been able to accomplish it ...
1
vote
1answer
56 views

System.LimitException occurs in WSDL Class

I'm getting System.LimitException: Too many callouts: 101 error message in my WSDL class file generated by SFDC. Repeated error was shown as following: ...
0
votes
1answer
153 views

Webservice Callout Exception: IO Exception: Read timed out

I have Salesforce trigger that triggers either a future method or batch job that does call outs to a SOAP webservice. I am randomly getting "(IO Exception: Read timed out)" exception. When the ...
0
votes
2answers
50 views

HTTP Callout returns HTML - can I load it into a new browser window?

I'm currently making a callout to a third party api from some Apex code triggered by a javascript button, sending info to fill out a web form on their end. The desired functionality is that the button ...
0
votes
1answer
26 views

Is Callout in a trigger always execute at the last, as sent email?

I have a callout in after trigger use asynchronous method, If Error happens in trigger execution, I want to cancel the Callout. Is there a way I can do that?
2
votes
1answer
37 views

Running Metadata API in Apex as a specific user

Calling the metadata API in Apex requires admin permission (or at least the "Modify All Data" access). To run the code as a non-admin user I am thinking I need to first login as the sys admin, get a ...
0
votes
0answers
23 views

Unsure of Testing HTTPCallOut

I need to deploy a class I wrote which is essentially for an HTTPCall Out. I've looked at this link but am still not sure where to start. I am a beginner to all of this. A trigger calls this class. ...
0
votes
0answers
30 views

Apex Batch Jobs with callouts running during maintenance

I've got an apex job that had started running before the maintenance and then about an hour into it, it appears there was some Salesforce maintenance or downtime. This appears to have suspended the ...
1
vote
0answers
72 views

How to call external saml protected web service from salesforce?

I want to call an secured external web service from salesforce. I dont want to pass user name and password as part of my webservice call out since I dont want to maintain them in salesforce. This is ...
2
votes
2answers
43 views

How to manage the cumulative time callout limit?

i searched aroud a solution, but I didn't found someone that already made the question. I'm searching an approach to calculate the value of the cumulative time spent in callouts... I checked the apex ...
5
votes
1answer
110 views

Calling a Callout via @future still gives uncommitted work pending error

Class A is simple page controller. It creates an instance of Class B. The user can click a button on a VF page to invoke a pagereference method in Class A that will invoke various methods in class B, ...
2
votes
1answer
94 views

What version soap does Salesforce use?

I'm having the worst time ever trying to find out what SOAP Salesforce uses. I haven't used it in forever the developer from our other system is asking me if it uses SOAP 1.1 or 1.2. NOTE-I will ...
0
votes
1answer
105 views

How to handle SOAP Response?

What is the common practice in handling the response of a callout? the response I get is a String datatype but it's value has xml elements within in them. I was thinking of manipulating the contents ...
0
votes
1answer
29 views

When exactly would a Calloutexception occurs in Salesforce?

I am trying to send a XML from Salesforce to an external system and callout exception occurs time and again . It is occurring sometime but working fine most of the times . What are the cases when a ...
0
votes
1answer
90 views

Does HttpCalloutMock work when the tested method doesn't return HttpResponse?

UPDATED: I've included the unit test. I'm trying to test a Visualforce extension method that does a callout but returns a PageReference, not an HttpResponse. I'm finding that the HttpCalloutMock ...
1
vote
2answers
50 views

Callouts, timeouts, and execution/response

I have a general question about the nature of callouts and timeouts in Apex. This is probably something I should know already, but I don't. From testing, if I set the callout timeout limit on a REST ...
4
votes
2answers
247 views

How to create HttpRequest body as plain string from WSDL?

Is there an good way to (automatically) create proper request bodies from WSDL files just as a plain xml string? I need this for perfoming calls from APEX to different salesforce APIs, mostly for the ...
2
votes
1answer
60 views

Best Way to Schedule Update of ~100k records

I have a custom object that I use to list all of the unique websites related to Accounts. There are about 100,000 records in this table. I'd like to schedule something like an Apex callout to update ...
2
votes
1answer
87 views

Renaming standard buttons in related list

I have created a custom object called Call__c. In my related list, the button on the related list says New Call. Is it possible to rename this to Link Call instead?
2
votes
1answer
64 views

Detecting and retrying CalloutException in Batchable iterable

I have a nightly batchable job in my SFDC org that queries a remote SFDC org for account and opportunities meeting certain criteria. Works great but every so often, I get System.calloutException read ...
1
vote
1answer
62 views

How to test callout in batch

I'm trying test a critical part of an application that is in a batch process and makes callouts to a server. MyObject__c obj = new MyObject__c(name='test'); insert obj; Test.startTest(); ...
0
votes
0answers
77 views

“Peer not Authenticated” Error?

I have created a custom Rest Service in SFDC . There is a external java program who is calling this service getting the error "Peer not Authenthicated". However, it work fine when make a call to ...
9
votes
1answer
160 views

How can I make a PATCH HTTP Callout from Apex?

I need to make a PATCH http request. I made the rather incredible discovery today that I can't set an HttpRequest to use the PATCH method, as when sending the request I get a callout exception: ...
0
votes
1answer
115 views

SOAP callout error: Failed to deserialize value

I am testing an integration between Salesforce and another system via Web Service Collouts. For that, I am using WSDL->APEX generated class. When invoke the web service via anonymous apex, I get a ...
1
vote
0answers
87 views

Is it possible to use the setHeader method on HttpRequest Class to set the referer?

Using an Apex callout to Google Maps geocoding API, I want to authorize narrowly within Google to protect the client ID from being reused by anyone else. I believe the referer header needs to match ...
8
votes
1answer
345 views

What would be the proactive steps that we need to take when salesforce disables SSL and enables TLS?

I heard that salesforce would stop the support for SSL 3.0 and will enforce TLS 1.0 and higher. https://help.salesforce.com/apex/HTViewSolution?urlname=Salesforce-disabling-SSL-3-0-encryption From ...
0
votes
0answers
110 views

Design Approach: Apex Callout limits

I am developing an appexchange managed application intended for multiple subscribing organizations and as a part of requirement my managed application needs to make an extensive API callout to an ...
4
votes
2answers
443 views

Rest HttpRequest to outside system

I'm having issues correctly getting Salesforce to connect to one of our external systems. They recently whitelisted the range of Salesforce addresses (At least so they said). Our Sandbox is coming ...
2
votes
1answer
142 views

Tackle Callout Limit Salesforce

I am creating an managed application for salesforce appexchange listing. App Functionality: On certain update events a trigger will send a few non-critical information to a external server ...
2
votes
1answer
127 views

How to make 100% sure your certificate is compatible with Salesforce

We recently had a certificate signed by DigiCert to used in a 2-way SSL integration with a partner. While it's root certificate is trusted by SF, the intermediate is not (see previous post) Despite ...
4
votes
2answers
203 views

Salesforce intermediate certificate chain

I'm working on a project that is integrating Salesforce with a 3rd party API. They require us to pass a client certificate. Our admin created a CSR in Salesforce and got it signed by DigiCert. ...
4
votes
0answers
28 views

Received fatal alert: bad_record_mac [duplicate]

When performing callouts from Salesforce to various remote endpoints, we'll occassionally/intermittently receive a "bad_record_mac" error. Sometimes they are persistent and don't go away after a ...
0
votes
1answer
64 views

How to manually give a callout in test class

I needed to throw a callout exception by hardcoding it in test class for batch class.Is there any method to do that ? try{ XXXX } catch (CalloutException excpObj) { ...