Hot answers tagged

3

This guard: if(!Test.isRunningTest()){ HttpResponse res = http.send(req); } and the use of Test.setMock(HttpCalloutMock.class, new FindAnApprenticeshipCalloutsMock()); are mutually incompatible. Your Mock class will never be called if you gate the HTTP call in your production code; remove the gate if you plan to use a Mock. ...


3

For anyone looking at this in the future, this post has solved my issue: StackExchange Post. You need to set your site name as your as the user name and it will show up in debug logs (without setting a cookie).


3

You can go by what Rahul has suggested, its called as Promise chaining. Modern javascript has new concepts that allow you to handle these complex requirements without making you go in promise chaining callback hell. Welcome Async and Await :) await - > The keyword await makes JavaScript wait until that promise settles and returns its result. ...


2

The first thing, be sure that you want to perform this in renderedCallback, because it runs very frequent. This runs every time your component is rendered on events like @track, @api, @wire are properties updated. to make successive promises you can do like this. renderedCallback() { let a, b; getApiResult().then(result => { this.a = ...


2

You seem to be confusing classes with methods. QueueableFindAnApprenticeship is a class, and you defined it like this: Public class QueueableFindAnApprenticeship... you cannot do HttpResponse response = FindAnApprenticeship.QueueableFindAnApprenticeship(); Instead, you can do FindAnApprenticeship.QueueableFindAnApprenticeship myClass = new ...


1

API Parameters should be URL encoded. They don't accept any other input formats like JSON. https://www.activecampaign.com/api/example.php?call=contact_add Here is an example of add contact in active campaign from Salesforce Apex String key = 'Get FROM https://{{Host}}.activehosted.com/app/settings/developer'; String authUrl = 'https://{{Host}.api-us1....


1

No debug logs available for guest user since Winter 17 as the latest answer to this question explains. So, your best shot is a try/catch + custom log.-


Only top voted, non community-wiki answers of a minimum length are eligible