executeApex
executeApex(
connection,apexFilePath):Promise<ApexExecuteResult>
Defined in: packages/simply-apex-core/src/apexExecute.ts:58
Executes an anonymous block of Apex code from a local file against connection and returns the
compile/execution result, including any debug logs produced.
Parameters
Section titled “Parameters”connection
Section titled “connection”Connection
The org connection to execute against.
apexFilePath
Section titled “apexFilePath”string
Path to the local .apex file to execute.
Returns
Section titled “Returns”Promise<ApexExecuteResult>
The compile/execution result.
Throws
Section titled “Throws”compile-failed if the Apex didn’t compile, execute-failed if it
compiled but threw during execution. Either way, error.result carries the full result so a
caller can still inspect line/column/logs.