Skip to content

BranchId

Gets the branch id of a document.

1
readonly string myDocument.BranchId

Remarks

Branch id is the unique identifier of a document between versions. It is used to get the latest version of a document.

Example

1
2
3
4
5
6
7
8
9
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"]);

See Also