Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
1k views

Batch Apex Class with HTTPCallout to Insert New or Update existing records

I'm struggling to make this work. I'm a very beginner developer and really need some help. I need to connect to an external system, get the Contacts from a list and create new Leads in Salesforce. In ...
Ernesto Pastura's user avatar
0 votes
1 answer
130 views

Httprequest doesn't work in batch although Database.AllowsCallouts implemented

We are planning to start new integration functionality to a new system in our landscape (Workday). To do this we created integrations in apex with httpcallouts. We are planning to start the initial ...
Ramon Out's user avatar
1 vote
0 answers
85 views

'uncommitted work pending' callout exception thrown in *tests only*

I am converting a lead in the Execute method of a batch class, then making 2 callouts with those results in the Finish() method. It works gloriously and throws no errors. However, in the test ...
Mobot818's user avatar
  • 142
0 votes
2 answers
3k views

Salesforce server IP which is making callout

I have a batch process which makes a HTTP call out to third party, but because of IP restriction third party is denaying the request. Is there any way to get Salesforce server Client IP from where ...
Harry's user avatar
  • 3
2 votes
1 answer
2k views

Sending batch rest api request from apex

I need to get multiple data from salesforce. To get the resource i call the endpoint as shown below. public String getData(Id docId) { HttpRequest request = new HttpRequest(); request....
lambad's user avatar
  • 385
1 vote
1 answer
5k views

http request in a for loop

I need to do a callout to Google Analytics in Salesforce. Based on the documentation, I can't bulkify the request with the records involved, because I can only have one date range. Is doing a http ...
Tyler Zika's user avatar
  • 2,922
1 vote
2 answers
176 views

How to make callout from a batch class without Statuscode 500

I have a batch class which basically does a soql of to get a list of account records. In the execute, i want to get the list returned and pass them to a Http callout function which will do a Post ...
saint's user avatar
  • 307
4 votes
1 answer
3k views

How to solve "First error: connection was cancelled here" error in batch apex [closed]

I have a batch apex class that makes an http (GET) callout to external api from salesforce. It returns x number of JSON objects which are decoded to create lists of cases but the dml upon insert never ...
codeSlayer's user avatar
2 votes
4 answers
17k views

How to set header as user name and password in post method

I am developing a batch class to make api calls and get data from that api in to salesforce. I need to send http request by post method, with user name & password as header. I have tried but i got ...
Nayana Pawar's user avatar
0 votes
1 answer
3k views

Apex Batch : You have uncommitted work pending. Please commit or rollback before calling out

I have a batch class that makes a external Http callout to create case records with a CreatePublicStuffCases() which is called in the start(). In the execute function, I have another callout to get ...
codeSlayer's user avatar