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

learn more… | top users | synonyms

1
vote
0answers
13 views

Queueable interface and getContentAsPDF

today i'm facing some issues with the queueable interface. This is my use case: i gave to send an email with a pdf attachment when an object is created. This is my solution: When user create a ...
1
vote
0answers
15 views

apex soap 1.2 call out

I am trying to do http callout with soap 1.2 request but facing following error..? Error - System.UnexpectedException: java.lang.IllegalArgumentException: invalid start or end. request:- ...
0
votes
1answer
45 views

Compile Error: Method does not exist or incorrect signature:

I'm working on a schedulable class that makes and http callout, I need my schedulable method to start my @future method with my callout. The error I'm getting is " Method does not exist or ...
0
votes
1answer
43 views

Callout from Apex Trigger

I have a requirement with the following functionality: Before the Opp stage gets updated to Closed-Won on ever opp I should be able to push the opp info to an external REST webservice URL as JSON ...
0
votes
1answer
47 views

Calling batch from finish of same batch job

Trying to implement Dan Appleman solution to call batch job from finish method of another batch job. Bu the execute method is continously looping. Can someone suggest me on ways to improve my batch ...
8
votes
3answers
126 views

AWS Signature (version 4) in Apex

Over the past few days I have been struggling to create the AWS signature version 4 in Apex to send a request via query string, I have followed the step-by-step instructions for signing aws requests, ...
3
votes
1answer
70 views

How to overcome 120 sec timeout in REST webservice calls?

I have a requirement where a user can request some data as an email attachment from one of our visualforce pages. I am fetching the data over a REST web service call from an external system. Using ...
1
vote
1answer
151 views

Is the data exchange with a https endpoint, encrypted?

I am developing in Salesforce an app, that communicates with a bunch of web services in Heroku. Till here, every thing is fine, but now we want to be sure that the data that we exchange is encrypted, ...
4
votes
1answer
80 views

Number of callouts allowed from batch execute method showing zero?

I have the below sample code: global class BatchApexExample implements Database.Batchable<SObject>{ public Database.QueryLocator start(Database.BatchableContext bc){ ...
2
votes
1answer
43 views

Future metod: How to avoid writing same query multiple times

Below is my class where I have to use same list results 4 times. So I moved it to a class. But since the methods postCases_User and postCases_Queue are future methods, I believe I can use only ...
0
votes
1answer
49 views

How to make more than 100 callouts per transaction?

I am new to Salesforce callouts and batch concepts but here is the requirement that I am working on: Requirement is to get data from a third party API and create lead objects in our salesforce and ...
-1
votes
1answer
17 views

Initial term of field expression must be concrete SOject: Id

Preparing a class that can post certain fields on opportunity in JSON format but running into the error "Initial term of field expression must be concrete SOject: Id" public class oppTrigClass { ...
0
votes
1answer
35 views

Apex To Azure API App

I am attempting to do a very simple test connection between Salesforce Apex and my Azure API App. I followed the tutorial to create the API App and I can access and use it via the URL just fine. When ...
2
votes
1answer
23 views

You have uncommitted work pending

I'm getting an error and did some research on this error that I should not do DML operations before callouts. So how can I resolve the issue in my case? I make two callouts in this class, I use the ...
1
vote
0answers
22 views

Question on Queueable interface

I have a class implements Queueable interface. 1.Do I have to annotate the method with @future in my class? I received "Callout not allowed from this future method. Please enable callout by ...
3
votes
1answer
45 views

Trigger fired by future function does not support callout

I'm developing an integration that makes an HTTP call to an external system from SFDC. The entry point for this code is an opportunity trigger. After a user updates the opportunity, my trigger fires, ...
1
vote
1answer
63 views

Call Queueable from future method

I have a use-case where I need to execute some logic in async mode and I found that using Queueable Interface I can achieve that. But when I am trying to the use the Queuable Interface, some issues ...
2
votes
2answers
26 views

@future callout + button + multiple clicks = multiple callouts instead of one

I have a button(with Javascript for call apex class) in Opportunity object. I have Apex Class with @future Callout for sending information about Opportunity to Jira. And it's work fine, except one ...
0
votes
1answer
14 views

Problem with standard set controller: You have uncommitted work pending

I have a component which makes a webservice callout and this runs successfully in a standalone context - ie within a test page. However the component needs to go within a page that uses the standard ...
-1
votes
1answer
69 views

call out error: System.CalloutException: Web service callout failed: WebService returned a SOAP Fault:

I am getting this error when try to make call out to .net server. System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: The formatter threw an exception while trying ...
1
vote
1answer
74 views

Salesforce to Salesforce connection using Apex, Callouts and SOAP APIs

We have continuous need to move some configuration related data from Salesforce Sandbox to Salesforce Production environment. End users are not comfortable with using data loader and need some simple ...
0
votes
1answer
49 views

Apex Callouts retrieve audio content

I am making a callout to a 3rd party to retrieve an mp3 file The endpoint is a HTTP GET (https://api.ubity.com/recording?key=HV5nPTLk98UPeTLxqwA8&callid=ABC12345) The response is the actual MP3 ...
-1
votes
1answer
71 views

Methods defined as TestMethod do not support Web service callouts, test skipped [duplicate]

Getting the error after running the test, and the code coverage for the class is 73%. I would appreciate if you could point me in the right direction. Class and the test class is below for your ...
1
vote
1answer
88 views

Accessing Named Credentials' data in apex

Is there a way of accessing the data (exact fields) stored in Spring 15' Named Credentials from apex? For example the username, password and endpoint link fields? And I don't mean for the callout, but ...
0
votes
1answer
37 views

APEX callout: job says complete however no update on our server with no debug log

I was testing out a new APEX callout where whenever an opportunity was won, it would call out to our application. I was able to get the job to complete, however I am not seeing the update take ...
0
votes
1answer
29 views

Number of callouts apex resource warning

I have a scenario where i need to call a Remote Action which makes a callout in a loop until i get some results from the external service. Reason to call it in a loop is that if for some input service ...
1
vote
1answer
47 views

update records through a @future callout method inside a before/after update trigger fires

I have a trigger that fires when the address has changed on a record. I make a callout to Google API to gain the longitude and latitude information that I then want to put inside of my record. When ...
1
vote
1answer
82 views

Sending a rest callout using JSONGenerator?

I am triying to send a callout using JSONGenerator in salesforce but I am having difficuty in putting the things through using .write methods. Any help will be great. { "request" : { ...
1
vote
1answer
50 views

Messaging.sendEmail - You have uncommitted work pending. Please commit or rollback before calling out

I have a callout class to make a call to a web service, I would like to send an email when the callout fails: String ret=''; try { ret = ApprovalService.CreateApprovalRequest(sessionId, ...
-1
votes
1answer
34 views

How to resolve HTTP Version Not Supported or StatusCode=505 error?

18:05:15.047 (47002596)|CALLOUT_REQUEST| [217]|System.HttpRequest[Endpoint=https://rest1.bullhornstaffing.com/rest- services/32qip/search/Candidate?BhRestToken=5a9c3e65-bad6-45c7-91d3- ...
1
vote
0answers
47 views

Well formed Http Request

I'm trying to make a callout to AWS S3 Put Object - Copy from APEX code, the request must be something like: PUT /destinationObject HTTP/1.1 Host: destinationBucket.s3.amazonaws.com ...
0
votes
0answers
47 views

How can I navigate to a specific URL from inside an Apex Class (Controller Extension)

I have an Visual Force page which when visited launches an Apex Callout, when this callout is done (Contact object has been created/updated) the original VisualForce page needs to update to reflect ...
1
vote
1answer
171 views

Update VisualForce Page field after Apex future callout

Want to update a VisualForce Page once my @future Apex Callout is done. How can I update a VisualForcePage, once the Webservice callout is done? Could I somehow divide the SearchCRM method, so that it ...
1
vote
2answers
52 views

During deployment, Test Class for trigger of @future method with callout returning “Uncommited work pending error”

So I'm familiar with the error System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out but I'm stumped with this one! I have a call with a ...
1
vote
1answer
57 views

What should be a good aproach to retry a web service callout?

Today i recived an exception mail saying this : Exception Message: Upsert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] ...
2
votes
4answers
267 views

How to insert a record and then do callout? [duplicate]

I have a visualforce page where i get a serial number and making callout to get the related information from external system on click of a button. Before making the callout i need to insert a record ...
0
votes
1answer
32 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
76 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
70 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
69 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
15 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 ...
1
vote
1answer
68 views

How to use what3words API in Salesforce to convert w3w address to coordinates

I am using what3words (http://what3words.com) to save locations in Salesforce, by simply copying the w3w address from their app and pasting it into Salesforce using the mobile app. I want to then ...
1
vote
1answer
154 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
185 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
18 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
52 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
124 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
60 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
97 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
73 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 ...