Configuring a grid to use attached documents
In the beqom Web Application, it is possible to configure process grids and data grids in order to accept attached documents by record. When the feature has been enabled on a grid, application users can then, provided that they have been granted the relevant permissions, view, upload and download attached documents.
This article details the procedure to follow in order to configure a process grid or a data grid to use attached documents.
Allowing the Use of Attached Documents in the Grid
Configuring a Process Grid
To allow the use of attached documents in a process grid, proceed as follows:
In the application database, open the k_m_plans table.
Locate the allow_attached_file column and set its value to 1 (the default value is 0, not nullable).
Configuring a Data Grid
To allow the use of attached documents in a process grid, proceed as follows:
In the application database, open the k_referential_grids table.
Locate the allow_attached_file column and set its value to 1 (the default value is 0 not nullable).
About the Document Reference UID
In order to be able to attach documents to a process grid or to a data grid, the system needs a reference UID in order to know to which unique column the document is attached.
Process Grids
For process grids, the reference UID is automatically generated and corresponds to the step UI in the k_m_plans_payees_steps.
If a payee step is deleted from the table, then the system removes all documents attached to the corresponding unique ID.
Data Grids
Since there is no common field in data grids that can be used as the record reference UID in all cases, you need to define which column (field) will carry the record reference UID for attached documents.
This record reference UID is used by the system to know to which data grid record a document is to be attached, as well as which documents (if any) must be deleted when a record is deleted from the data grid.
To set a field as the reference UID, proceed as follows:
In the application database, open the k_referentials_grids_fields table and locate the field you want to define as the reference UID.
Set the value of the column is_uid_reference to 1 (the default value is 0).
In the Admin Portal interface, make sure that the column is activated (under DATA > Administration > Grid Editor > <GridName > Columns).
Hiding the Reference UID Column
Once the operation above has been performed, the reference UID column is then visible in the data grid from the application. For aesthetic purposes, this column can be hidden from the grid when opening the grid in the beqom application. To hide the column, proceed as follows:
Log into the beqom Web Application interface.
Open the (Undefined variable: CompoVariables_WA.Data), and the open the grid in which you want to work.
In the grid toolbar, click Columns.
Uncheck the box corresponding to the column in list of columns.
Click Apply. The column is now hidden from the grid.
Limiting the Edit and Delete Permissions to Document Owners and Super Admin Users
Configuring a Process Grid
To limit the right to edit the properties and to delete a document attached to a process grid only to the document owner and super admin users, proceed as follows:
In the application database, open the k_m_plans table.
Locate the owner_restrict column and set its value to 1 (the default value is 0, not nullable).
Configuring a Data Grid
To limit the right to edit the properties and to delete a document attached to a data grid only to the document owner and super admin users, proceed as follows:
In the application database, open the k_referential_grids table.
Locate the owner_restrict column and set its value to 1 (the default value is 0, not nullable).
Security
In order to guarantee the security of attached documents, the following security measures are enforced:
A secure connection to and from beqom is maintained throughout the upload and download processes.
Access level controls are put in place on uploaded files in order to ensure that only authorized users can view/download available documents.
All uploaded files are encrypted.
Attached Document Storage
Attached documents are stored in Azure blobs. If no container exists for the tenant, the container is then automatically created. The database that manages attached documents is a separate database (not in the tenant database).
APIs
The following File service methods are available to interact with attached documents:
| Service | Action | Method | Body/Parameters | Response |
|---|---|---|---|---|
| File | GET | /api/files/{referenceUID} | type | [{ StorageContentUID:String DisplayName:String Description:String StatusID }] |
| POST | /api/files/{reference UID} | { type, file stream, description } | { StorageContentUID:String DisplayName:String Description:String StatusID } | |
| POST | /api/files/{StorageContentUID} | { description } | Success or failure message | |
| GET | /api/files/{StorageContentUID}/download OR /api/files/{referenceUID}/download | type (for referenceUID) | File stream if only one file is found OR Error message if multiple files are found | |
| GET | /api/files/{StorageContentUID} OR /api/files/{reference UID} | type (for referenceUID) | Success or failure message |
Known Limitations
The following list details the known limitation of the attached document feature in the beqom Web Application:
The feature supports only Azure blobs. Other storage containers are not supported
Anti-virus check is not supported
The file encryption is limited to the encryption provided by the Azure blobs
Attached documents are not supported when exporting documents or when importing documents
Attached documents are not supported when adding a record to a data grid
Password protection of the files is not supported
The feature is not available for process forms (only process grids and data grids)
As of today, the history of the table listing the actions performed on attached documents (upload, deletion, etc.) in the catalogDB is not accessible via beqom APIs. Only the Ops team can retrieve information about attached documents history via the history table
Further Reading
To know how to use the attached document feature in the beqom Web App interface, refer to:
For process grids: Working with Attached Documents in a Process Grid
For data grids: Working with Attached Documents in a Data Grid