New answers tagged

1

You should never use a domain from which a request originates as a way of "authentication", as a it doesn't provide any means of security and can easily be bypassed. IP whitelisting is indeed the more secure way to go, as even though an IP address from which a request is sent CAN be spoofed, it will never receive any data back, since it will be sent back to ...


1

Got it! Use this code (I tweaked a little Tyler's code cause I got a couple of errors): //call from batch with parameters public void inboundFaxCall(String endpoint, String method, String sfaxApiKey, String securityToken) { String requestMethod = 'ReceiveOutboundFax'; String encodedMethod = EncodingUtil.urlEncode(requestMethod, 'UTF-8'); ...


0

In addition to the point raised by @Rijwan Mohammed in the other answer, this isn't the only issue in the code. Your Apex code won't work as you expect because your "makeCallout" method instantiates and populates its own WeatherUtil.Weather instance, so the values collected in makeCallout are lost. It also uses hard-coded state and city. Try something like: ...


1

The official documentation for this is here. You can also read this blog posting on the same subject. Use @AuraEnabled for variables that you want to return to the lightning component, so in your case: public class Weather { @AuraEnabled public String imageUrl { get; set; } // image.url @AuraEnabled public String imageTitle { get; set; } ...


0

For creating a user account - you can call an out of the box REST API, it sounds like you're walking down this path. While you can (for example) create a single User object (record) in one REST call via an out of the box API, more than one record of one or more object type may need to be created for a user to be fully provisioned. You can use a Composite ...


1

A service that lives outside of Salesforce and documents its APIs via OpenAPI (formerly Swagger) specification can be consumed by Salesforce in a somewhat automated fashion. The creation of the client calling this service from the Salesforce platform and the callout itself must be done in a very specific way, via a framework that Salesforce refers to as ...


1

This might be a recently introduced SF bug. The connected app used to show up on User regardless of the authorization policy if the access token was issued. Now it doesn't show up in some cases, notably in JWT flow if the oAuth policy on the connected app is set to Admin approved users are pre-authorized. You can view the tokens issued by the app by ...


2

ANSWER: Escape the escapes. Because this is being handled both in Apex and as JSON, it seems they both need their own "\". Or should I say \"\\". Sorry, bad joke. Maybe others can offer even more detailed explanation. Change the part in question to: ...state.completion", "[{\\"name\\":\\"connect_adapt... and so on.


3

Change the class signature: public with sharing class APTS_UsageInput_InsertTempRecordsBatch implements Database.Batchable<APTS_UsageInputWrapper> Make sure you consistently apply "generics" in your Batchable implementation, as covered in the documentation: public Iterable<APTS_UsageInputWrapper> start(Database.BatchableContext context) and:...


Top 50 recent answers are included