Skip to content

Version

Gets or sets the version number of the document.

Type

string

Declaration

1
 string myDocument.Version

Remarks

The version number is formatted as "Major"."Minor"."Revision" (e.g., "1.2.3").

Examples

Set the version number of a draft

1
2
3
4
5
6
7
var doc = $Documents.Get($Xml.Evaluate('DocumentId'));

// the version number can be changed only while the document is a draft
if (doc.State === 'Draft') {
    doc.Version = '2.0.0';
    doc.Save();
}