New answers tagged

0

I had the same problem but I was able to fix it by pressing the letter "S". Give it a try.


1

The body of the request should contain the three elements listed as being in the body. They are not headers. String body = 'grant_type=authorization_code&code='+authCode+'&redirect_uri=my redirect url'; request.setBody(body); request.setHeader('Content-Length',body.length()); Note that the Read Timeout error happened because the Content-Length did ...


3

The reason is, as any good unit testing framework would require, to ensure that the unit tests are not reliant on any external resources. Unit tests should be entirely self-sufficient. You don't want your tests failing simply because the external system that your callout invokes is temporarily unavailable from the Salesforce org, for example. The unit test ...


0

Each invocation of execute() in an Apex batch class is a single transaction. The callout limit for a transaction is 100. While it's not clear what exactly Builder.getListOutBoundRecords() is doing, it appears to be sourcing more than 100 records at a time. Meanwhile, start() is identifying exactly one record: String soql = 'Select Id, JOB_ID__c from ...


1

You'll need some middleware that will pull the xml file from the ftp server and pass it back into salesforce. The request process would look something like: Apex -(Rest Request)-> Middleware -(FTP Request)-> File Server -(FTP Response)-> Middleware, then the middleware would upload file into content document via rest api. Can we do an HTTP request to ...


0

Fixed. The problem was the space in "type": "CSVEnergyLead__c ". Thanks anyway.


0

It is hard to be sure this is answering the right question since (as @cropredy said) your question isn't really clear, but on the off-chance I am understanding what you need to do: Use of a batch to simply execute some logic to get an external value and store it is quite wrong - at the very least, this is going to consume 2 async apex executions per batch ...


2

You're trying to deserialize something that's in the middle of where you are (the Om class). You'll need to deserialize the outside first, then drill in to that value: Json2Apex result = Json2Apex.parse(jsonResponse); for(Json2Apex.Om om: result.OutboundMessageList.om) { ...


1

I would make sure to follow all of the steps in the following documentation, "Connect the Clouds", as it encompasses everything needed to properly set up the integration between SFDC and SFMC https://help.salesforce.com/articleView?id=mc_co_connect_the_clouds.htm&type=5 The Trail, while valuable, may miss a few necessary items.


0

Here's a sample curl to post incident in ServiceNow curl "https://instance.service-now.com/api/now/table/incident" \ --request POST \ --header "Accept:application/json"\ --header "Content-Type:application/json" \ --data "{'short_description':'Unable to connect to office wifi','assignment_group':'287ebd7da9fe198100f92cc8d1d2154e','urgency':'2','impact':'2'}" ...


2

One of the common misconception is that connected app is required for every org. Connected app can be created in a developer environment and that's sufficient for the other orgs to authorize their Salesforce environment and you can store the necessary tokens. Workbench , Salesforce CLI and lot of third party apps use same method. They have a org where they ...


3

For anyone looking for a similar question, it's possible with EMPAPI + CDC. Using a custom component on record page that listens to the record's channel handle the change event if the record id matches with the one on the event, then fire refresh view you can check the record id on the event payload. Documentation { "payload": { "recordIds": [...


1

HttpRequest doesn't support PATCH as the method. From the docs: Possible values for the method type include: DELETE GET HEAD POST PUT TRACE Setting X-HTTP-Method-Override header to PATCH is a workaround some services support if a client can't issue a PATCH request. Docs for getimpala.com APIs do not mention this option nor do ...


1

The problem is Salesforce supports max up to 18 digit number, including decimal points. Even, in a real-time scenario, you won't need any number which is 21 digit see 21 digits ---> (204323423423412324333). As of now, no such thing exists with a price of 21 digits integer in this world. So it does make sense that why SF limits it up to 18. If you ...


0

Interesting problem. Left to me, I would take a hard look at the whole real-time, one-way sync architecture for so many records. I am sure you've considered the queuable Apex limit and chaining jobs to make it all efficient. That can lead to the target system process time being a big variable when trying to process 100K records (~ 1+ transaction / second ...


0

Instead of a trigger, can you do this on a scheduled basis? A design pattern for that would be having a batch class that runs on a predetermined schedule that would query the records for "integration" and perform the callout to your other org: global class YourBatchClassvimplements Database.Batchable<sObject>,Database.AllowCallouts { //... ...


Top 50 recent answers are included