Skip to content

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

Function: reloadCodeVersion()

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

Defined in: packages/b2c-tooling-sdk/src/operations/code/versions.ts:108

Reloads (re-activates) the current code version.

This performs a "toggle" activation - first activating a different code version, then re-activating the target version. This forces the instance to reload the code.

Parameters

instance

B2CInstance

B2C instance

codeVersionId?

string

Code version to reload (defaults to current active)

Returns

Promise<void>

Throws

Error if reload fails or no alternate version is available

Example

typescript
// Reload the currently active code version
await reloadCodeVersion(instance);

// Reload a specific code version
await reloadCodeVersion(instance, 'v1');

All rights reserved.