Hot answers tagged

2

There are a number of issues here leading to the errors you're seeing. Your constructor is not called when accountTransactions() is because accountTransactions is both a static function and a future method - meaning accountAddress, accountId, and accountTrans are not visible within the context of the method as they're properties that belong to an instance ...


2

There are many possible alternatives, depending on your circumstances. Long Timeout If your API has a synchronous callout that will wait until the order is complete, you can set the timeout to 120 seconds on the callout, thus eliminating the need to do any theatrics. Visualforce You can use an apex:actionPoller to call the server every 30 seconds. JavaScript ...


2

To update each field to have format: @AuraEnabled public $Type$ $fieldName$ { get; set; } Aura/Lightning only works with @AuraEnabled fields, and {get;set;} allows you to convert your JSON to Apex


2

RFC 2872 allows underscores for subdomains, as written in your example, but not all services support this nomenclature. Unfortunately, at this time, you'll need to choose a hostname and subdomain that does not include underscores. In particular, you also won't be able to reference sandboxes that include an underscore in its name, so you should avoid naming ...


1

You can make 100 callouts per transaction. If you want to keep it as a future method, just pass in a list of up to 100 account Ids (less if you also need to get a token or some other callout), or use queueable, and you can chain them together. Every 200 records should require 2 future methods or 1 queueable method (with chaining). Your trigger is already ...


1

The 100 Callouts is a limit per transaction -- since each future is a separate transaction and it only does 1 callout, you are thus not breaching that limit However, a given synchronous Apex transaction can only make 50 future calls Your trigger is executed synchronously with Data Loader so if the Data Loader batch size results in more than 50 different ...


1

You could still use future methods, you just need to bulkify your future code to accept a list of inputs instead of just one. Have every 50 records or so be placed into a single future call. If you decide to use Queueable or Batchable, you would still need to bulkify your code, since you only get a handful of each type you can use per transaction. I would ...


1

As I answered here, it appears to be an issue with the description. Fixing the description part should help solve the error and take you to the next step. { "swagger": "2.0", "info": { "title": "Manage vacancies API (Sandbox)", "version": "1.0", "description": &...


1

Thanks, the funny thing I discovered is that this is easy to work around by using a named credential, there is no problem using an underscore there. You would think if Salesforce allows it in named credentials, it would allow it in remote site settings.


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