Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/code / reloadCodeVersion

Function: reloadCodeVersion()

reloadCodeVersion(backend, codeVersionId?): Promise<void>

Defined in: packages/b2c-tooling-sdk/src/operations/code/scripts-backend.ts:33

Reloads (re-activates) a code version using a toggle-activate technique.

Activates an alternate version, then re-activates the target. This forces the instance to reload the code (rebuild caches, re-register custom APIs, etc.). Works on top of any ScriptsBackend since it only uses list+activate primitives.

Parameters

backend

ScriptsBackend

Scripts backend (OCAPI, SCAPI, or fallback)

codeVersionId?

string

Code version to reload (defaults to current active)

Returns

Promise<void>

Throws

Error if no alternate code version is available for toggling

Released under the Apache-2.0 License.