Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

string myDocument.BranchId { get; }

Remarks

If used on a new document, that wasn't replicated/copied in some way (doesn't have branches), it will be nullBranch id is the unique identifier of a document between versions. It is used to get the latest version of a document.

Example

Code Block
languagejs
var doc = $Documents.New('My Document');
doc.Publish(["myfolder", "otherfolder"]);

var id = doc.Id;
var existingDocument = $Documents.Get(id);

// Using Branch.Id after copying document:
var newVersion = $Documents.NewVersion(existingDocument.BranchId, 'My Document Version');
newVersion.Publish(["myfolder", "otherfolder"]);

...