Document Entry Function Pub (Document Entry Deletion)
Extensions can use the public codeunit "Document Entry Function Pub" (ID: 5227452) in the namespace Simova.DMS.Archive.DocumentEntry to delete marked Document Central Document Entries through the standard deletion process.
Requirements:
- Add Document Central as a dependency of your extension.
- Mark every Document Entry you want to delete in the record variable that you pass to the function.
DeleteDocumentEntry
Before calling DeleteDocumentEntry, mark the Document Entries to be deleted in the supplied record variable. The function processes all entries marked in that variable through the standard deletion process. This process handles deletion confirmation, retention restrictions on documents and their versions, access control, and deletion logging.
Parameters
| Var | Name | Data Type | Subtype | Length | Description |
|---|---|---|---|---|---|
| Yes | ParamRecordSIMDMSDocumentEntry |
Record | SIM_DMS Document Entry |
A record variable containing the Document Entries marked for deletion. |
Return Value
| Data Type | Description |
|---|---|
| Boolean | true when the standard deletion process reports completion; false when deletion is canceled or blocked by retention or access control. |
If the supplied record variable contains no marked Document Entries, the function raises the error No Document Entries for Deletion found. Other errors, such as missing required setup, can also be raised.
Code Example
Show example code
The Boolean return value lets the calling extension identify whether the standard deletion process completed. The function does not bypass the standard checks.
Permissions
The Document Central ADMIN and USER permission sets include execute access to this codeunit. The standard deletion process still checks whether the user may delete the documents.