ftos.data.closeLastApprovedVersion

Closes an approved entity record version and redirects its references to a specified version draft.

This method transitions the record version currently in the Approved business workflow state to the Version Closed state. All references pointing to the closed version are redirected to the specified Version Draft record. This includes references from related versioned entities that have versioning temporarily disabled.

IMPORTANT!  
The record's entity must be configured for versioning (see the Entity Cloning and Versioning documentation for details). Also, a version draft of the record must exist to receive the redirected references (see ftos.data.version for information on how to create a new record version).
IMPORTANT!  
It is recommended to execute this method immediately before approving a new record version, preferably within the same transaction.

This is a data service method for business service components.

Syntax

Copy
ftos.data.closeLastApprovedVersion(recordId : string, versioningSettingName : string): void;
 
Parameter Type Description
recordId string The ID (primary key) of the version draft that will receive the relationships from the closed version.
versioningSettingName string The name of the clone and version settings used to configure the entity's versioning.

Examples