std.DeleteObject
This job identifies an object (document, register, folder) via the specified parameters and deletes it — either into the recycle bin (reversible) or permanently (not recoverable). The job is the central deletion path for DMS objects.
The parameters dwParentID and dwParentType are only considered for documents. If a
document has multiple entries in the sdrel table (multi-location storage) and both
dwParentID = 0 and dwParentType = 0, all locations are removed; with a parent set, only
that one location is removed.
1. Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
|
STRING |
Yes |
Deletion method: |
|
INT |
Yes |
ID of the object |
|
INT |
Yes |
Type of the object to be deleted |
|
INT |
Yes |
ID of the parent object. |
|
INT |
Yes |
Type of the parent object. |
|
STRING |
No |
|
|
STRING |
No |
Generic enaio® mechanism to switch the effective user context for the operation. The supplied user name is used for the permission check and the history entry, even when the connection runs under a technical service user. |
2. Output Parameters
| Name | Type | Dependency | Description |
|---|---|---|---|
|
STRING |
Optional |
Only returned if a register/cabinet to be deleted contains subobjects. |
|
INT |
Optional |
Always |
3. Return Value
(INT): 0 = job successful, otherwise error code (e.g. object does not exist, missing
delete permission, foreign-key constraint, object is locked).
4. Notes
-
Recoverable with
Recycle— an object in the recycle bin can be brought back through the restore function as long as it has not been permanently deleted (Delete). -
History entry — every deletion creates an audit entry in
osobjhist; theosuservalue there corresponds to the user switched in via$SwitchContextUserName$(otherwise the connection user). The history entry survives the permanent deletion of the object. -
Asynchronous index cleanup — after a successful deletion, a message is enqueued into the
FULLTEXTDELETEqueue (oscpmqueue) so the full-text indexer removes the index entry. Right after this job returns, the object may therefore still appear briefly in the full-text index until the indexer has processed the message — see Capture and Processing Messages (CP). -
Multi-location storage —
Recyclewith a non-zerodwParentID/dwParentTyperemoves only that addressed location; withdwParentID = 0, all storage locations of the object are removed.
5. Related Jobs
-
std.RestoreObject — restores an object previously deleted via
Recyclefrom the recycle bin -
std.DeleteDocument — specific variant for plain document objects;
std.DeleteObjectis the generic path for arbitrary object types -
std.DeleteDocumentVersion — deletes a single document version rather than the whole object
-
dms.XMLDelete — XML-based delete variant through the generic XML interface of the DMS engine
-
std.CreateCPMessages — produces CP messages (analogous to this job’s implicit
FULLTEXTDELETEenqueue)