When changing the api version of the connection it doesn't use it when running anonymous apex.

Issue #887 new
Justin Julicher created an issue

In developer workbench when you select your version it will execute anonymous apex with the same version.

An example use case for this is clearing AsyncApexJobs that are stuck in queued status using System.abortAsyncJob(job.Id) which you can only do in API version 31, after this it gives you an error stating you must use the parent Id.


Comments (1)

  1. Scott Wells repo owner

    Yeah, right now it's using the Apex SOAP API to execute anonymous Apex, and that means that it's using the SOAP API endpoint of the version for which the SOAP clients were generated. That's always the latest version in IC. That's actually true for the most part for interactions with the Salesforce APIs...it uses the latest API version. I'll keep this around to look into whether there's a way I can set an API version header or something to get it to use a per-request, client-specified API version.

  2. Log in to comment