Skip to main content

IsTrackRevisions

Checks if change tracking mode is enabled or not.

Syntax

expression.IsTrackRevisions();

expression - A variable that represents a ApiDocument class.

Parameters

This method doesn't have any parameters.

Returns

boolean

Example

Check whether revision tracking is currently enabled in a document.

// How do I find out if change tracking is turned on in a document?

// Verify the tracking state before deciding whether to record or ignore edits in a document.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
doc.SetTrackRevisions(true);
let trackRevisions = doc.IsTrackRevisions();
paragraph.AddText("Change tracking is enabled: " + trackRevisions);