checkout()
Checks out a document via DMS.CheckOutDocument. Locks the document for the
current user so that no other user can modify it until it is checked back in or
the checkout is undone.
1. Signature
-
Sync
-
Async
ecm.dms.checkout(
model: ECMDocumentModel | int,
object_type_id: int | None = None,
) -> None
await ecm.dms.checkout(
model: ECMDocumentModel | int,
object_type_id: int | None = None,
) -> None
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
Either an |
|
|
|
The numeric object type ID. If |
4. Exceptions
| Exception | Condition |
|---|---|
|
|
|
|
|
The document has no pages or is already checked out. |
5. Examples
5.1. Check out a document from a query result
-
Sync
-
Async
doc = ecm.dms.select(InvoiceDocument).where(InvoiceDocument.Title == "Invoice").execute()[0]
ecm.dms.checkout(doc)
doc = (await ecm.dms.select(InvoiceDocument).where(InvoiceDocument.Title == "Invoice").execute())[0]
await ecm.dms.checkout(doc)
6. See also
-
undo_checkout() — Undo a document checkout
-
files() — Download the files of a document