DocumentMetadata.version

Note:

The content in this help topic pertains to SuiteScript 2.1.

Property Description

The stored document's version number.

This property is read-only. The initial version is "1". The API automatically increments the version each time the document is updated.

Type

string

Supported Script Types

Server scripts

Module

N/dataStore Module

Parent Object

dataStore.DocumentMetadata

Sibling Object Members

DocumentMetadata Object Members

Since

2026.2

Syntax

Important:

The following code sample shows the syntax for this member. It isn't a functional example. For a complete script example, see N/dataStore Module Script Samples.

            // Add additional code
...

const value = metadata.version;

...
// Add additional code 

          

General Notices