Attached documents
This page explains two windows that work together: Attached Documents, the list of documents of one record, and the Attached Document window, which adds, changes or shows a document. It also explains the Scan file window and the Edit List data window. For the steps see Attach a document to a record. To search the documents of all records see Search in attached documents.
Opening the window
You do not open the list from the ribbon. You open it with the Documents button in the window of the record whose documents you want to manage. Many windows have this button, among them the account card, the customer card, the bill, the credit and debit note, the journal entry, shipping to a profit center, shipping between warehouses and finished orders. The page of each window gives any extra condition.
The Documents button in record windows
These rules are general. They repeat in every window that has the button:
- Appearance: the button appears if your licence includes the archiving feature.
- Enabled: the button is enabled if the record is saved and either the record has documents or its type is linked to at least one document type (see Link Records with Documents Types). Your Attached Documents permission for the record type must also allow the security level of the record. Each window sets extra conditions, so read its page.
- Title: the window is titled Attached Documents. If the record window sends the name of the record, it is added after a dash.
- Opening by itself after an add: some windows open this list by themselves after you save a new record, if you turned on Show this window by default after adding at the bottom of the list (see the list).
Permissions
For every operation the program checks two permissions together. The operation goes ahead only if both allow it:
- The permission of the record type, in the Documents tab of Users Management. Its columns are Attached Documents, Add Documents, Modify Documents and Delete Documents.
- The permission of the document type, in the Documents Types tab. Its ten columns are Add Documents, Preview Documents, Modify Documents, Delete Documents, Add File, Scan File, Delete File, Edit File, Edit Data and Change Document Type.
The permission has levels. The record-type permission is compared with the security level of the record itself, and the document-type permission with the security level of the document. It allows the action if your level equals the level or is higher. See Cards permissions in Users Management for the two tabs.
| Operation | Permission checked |
|---|---|
| Saving a new document | Add Documents in both permissions, at the security level you chose for the document. |
| View | Attached Documents in the record permission and Preview Documents in the type permission. |
| Saving a change to a document | Modify Documents in both permissions. |
| Delete a document | Delete Documents in both permissions. |
| Browse (add a file) | Add File, together with Add Documents for a new document or Modify Documents for an existing one. |
| Scan | Scan File, with the same condition. |
| Delete (a saved file) | Delete File, with the same condition. A file you added in the same window before saving is deleted without a check. |
| Opening a saved file to change it | Edit File, with Modify Documents in a Modify window, and with Add Documents in a new document and in a View window. |
| Changing the data fields | Edit Data with Modify Documents, in a saved document only. Not checked in a new document. |
| Changing the Document Type | Change Document Type with Modify Documents, in a saved document only. |
Neither the list nor the search results show a document that the two permissions do not let you view: Attached Documents in the record permission and Preview Documents in the type permission, at the security level of the document.
The list window
The list shows only the documents of the open record, oldest first by creation date. The documents load by themselves when the window opens.
Commands
| Button | What it does |
|---|---|
| New | Opens a new document window (see the document window). If the record type has no linked document type, the message "Current form is not related to document types" appears. If the record did not send its type in a valid form, "Invalid Type ID" appears. After saving, the program reloads the list. |
| Modify | Opens the selected document for change. It needs the permissions in the table above. If they are missing the message "You have no permission" appears. After saving, the program refreshes the row of the document. |
| Delete | Deletes the selected document after the delete confirmation, which always appears. The document and its files leave the list. It needs Delete Documents. |
| View | Opens the selected document read-only. |
The commands Modify, Delete and View are not available until you select a document. When you select a document, the program shows its data in the information window if it is open, provided you have the permission to view it.
Right-click a row for Modify, Delete and View. Double-clicking a row opens the document for change, not for viewing.
List columns
| Column | Content |
|---|---|
| Number of documents : | The position of the document by creation date when the list opens. It does not change when you sort the grid. |
| Name | The name of the document. |
| Latin Name | The Latin name of the document. |
| Date created | The date the document was added, in the program's date format. |
| Document Type | The name of the document type. |
| Files Count | The number of files in the document. |
At the bottom of the grid the program shows Documents count and the number of documents. The grid sorts and filters like any grid. See Grids.
The option Show this window by default after adding
A check box at the bottom of the list. If you turn it on, the record window opens this list after you save a new record. The program keeps the option for each user.
- Bills, vouchers, orders and commercial papers each have their own option.
- All other record types share one option.
- The check box is hidden, keeping its space, for direct purchase in a profit center and its return.
The document window
The window is titled Attached Document. It opens in three modes: New (add), Modify and View (read-only). In View mode the Save button, the data fields (except the Yes / No field) and the file buttons are disabled.
Document header
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Name | The name of the document. | Yes | Not repeated among all documents. At most 250 characters. In a new document the program fills in the automatic name if you turned on the document name settings for the record type (see Link Records with Documents Types). Otherwise it stays empty. |
| Latin Name | The Latin name of the document. | No | At most 250 characters. Not repeated if you type one. |
| Security | A menu button with Low, Medium and High. The icon of the button changes with the level you pick. | No | Low in a new document. Disabled only in View mode. The level decides who can see the document. See Permissions. |
Below the header: the Document Type and the data fields in the left column (right column in Arabic), and the list of files beside them. You can drag the border between them to change the widths.
Document type
A drop-down list that does not accept typing. It holds the document types linked to the record type. You pick the type of the document, which changes the data fields below it and the extensions allowed for files.
- The list is required. The first type is selected in a new document.
- In a saved document, if its type is no longer linked to the record type, the program adds it to the list so the document appears whole.
- The list is read-only in View mode. In Modify mode you can change it if you have the Change Document Type permission.
- The name shows in Arabic in the Arabic interface, and in the Latin name in the English interface when there is one.
To define types and their fields see Attached Document Type Card.
Document data fields
Under Document Type the window shows the fields of the selected type, in the order the type sets, without hidden fields. Each field has its name and, beside it, an input control. Fields are defined in Document Fields, where you set the type of each field, whether it is required, whether its value must be unique and its default value.
- Required fields: if you leave one empty, the message "Field is required" appears beside it when you save.
- Unique fields: if you repeat a value that exists in another document of the same type, "Field must be unique." appears.
- In a new document every field starts with its default value. A saved document shows the saved values, and a field with no saved value shows its default value.
- You can always edit the fields of a new document. In a saved document you can edit them in Modify mode if you have the Edit Data permission. The Yes / No field is the exception (see Yes / No field).
Text field
A free text box. It can be required or unique.
Number field
A number box that accepts fractions. If you leave it empty the program saves 0. It starts with the default value of the field definition, or 0 if none is set.
Date field
A date editor in the date format of the program. It can stay empty if it is not required. Its default value comes from the field definition: Opening Date, Closing Date, Today, Start of Month or End of Month. Without a default it is empty.
Yes / No field
A check box that carries the name of the field. The program saves it as checked or not checked. The check box can be changed in every mode, even without the Edit Data permission.
List field
A drop-down list that does not accept typing. Its items are the list of the field. If the field is not required, the item <select an item> comes first. You edit the items from the field definition (see Edit List data).
Files
The files list shows the files of the document. The files of a document are stored in the database.
| Column | Content |
|---|---|
| File Name | The name of the file with its extension. |
| Date created | The date the file was added. |
| Size (KB) | The size of the file in kilobytes. |
At the bottom of the grid are the number of files and the total size.
| Button | What it does |
|---|---|
| Browse | Opens a window to pick files from the computer. You can select several. The file type list starts with All defined extensions, then every extension allowed for the document type whose maximum size is above zero. For each file the program checks the extension and the maximum size as the document type defines them. It refuses a file that fails with a message and continues with the other files. |
| Scan | Opens the scan window. |
| Delete | Removes the selected file from the list. The program does not delete it for real before you Save the document, and cancelling the window brings it back. |
| View | Opens the selected file in its default Windows program. |
If you open the documents of a voucher or a commercial paper from an order, Scan and Delete are disabled.
All four buttons are disabled in View mode. Delete and View are also disabled until you select a file. To read a file in a View window, double-click it: that opens it without these buttons. In a View window too, the program saves a change to a saved file if the two permissions allow it.
Right-click a file for View and Delete. Double-clicking a file opens it.
What happens after opening depends on the file:
- A saved file, and you have the Edit File permission: the program watches the temporary file. If you change it and save it in its program, a question asks whether to save the change in the archive (see Messages). If you answer Yes, the program checks the maximum size and writes the change to the database at once. It does not wait for Save on the document, and cancelling the window does not undo it.
- A saved file, and you do not have Edit File: a message warns that no change will be saved.
- A file you added in this window and did not save yet: a message warns that changes will not be saved in the archive, and that you must save the document first, then open the file and change it.
Saving the document
When you click Save the program checks in this order and stops at the first failure:
- The permission. If it is missing, "You have no permission" appears.
- The validity of Name and of the data fields: required, unique and length limit. The cursor goes to the first wrong field.
- A repeated Name or Latin Name among documents. The duplicate message appears.
- Files. If no file is left in the document, a message asks whether to continue, with Yes and No. No returns you to the window.
- The save confirmation, if the warning option is on: On save for a new document and On modify for an existing one. See Messages and callouts.
Then the program saves the document, its fields and its files together in one operation. While it saves, the window is disabled and a progress bar shows at the bottom. On success the window closes. On failure an error message appears and the window stays open.
The program records the user and the date of the add in a new document, and the user and the date of the change in a changed document. The document is linked to the record you opened it from.
The button at the bottom is Close, and it becomes Cancel after any change. Closing the window after a change asks whether to ignore the changes, if the warning option On cancel is on.
Scanning
The Scan file window opens from the Scan button. It connects to the scanners installed on the computer through TWAIN.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Scanner | The scanner to use. | Yes | The names of the installed scanners. The first is selected when the window opens. If there is no scanner the list is empty, and "Scanner is required" appears when you click Ok. |
| File Format | The format of the resulting file. | Yes | The image formats Windows can create (such as bmp, jpg, gif, tif and png) that the document type allows, then Pdf always. jpg is selected by default if it is in the list, otherwise the first format. |
| File Name | The name of the resulting file, without extension. | Yes | The default is New file. If you leave it empty "Missing Name" appears. |
The Ok button starts the scan. The window of the scanner's own program may appear. If the scan succeeds the window closes and the file is added to the list with its name and extension. Image formats keep only the first scanned page, while Pdf joins all pages in one file. After the scan the program checks the extension and the maximum size as in Browse.
The Close button becomes Cancel after you change any field.
Edit List data
This window edits the items of a Menu field. It opens from the Edit List button next to the default value in the field definition window (see Document Fields). Its title is Edit List data. It does not open from the document window.
Item editor
| Field or button | Description | Required | Values and rules |
|---|---|---|---|
| Name | The name of the list item. | Yes | At most 250 characters. Not repeated in the list. |
| Latin Name | The Latin name of the item. | No | At most 250 characters. Not repeated if you type one. |
| Save | For a new item, adds it at the end of the grid. For a selected item, replaces its row. Then it empties the editor. | — | Disabled until you change something and no field has an error. |
| Delete | Deletes the item in the editor from the grid, without a confirmation. | — | Disabled unless an item is open for change. It does not delete an item that a document used. |
| New | Empties the editor for a new item without saving what is in it. | — |
Items grid
| Column | Content |
|---|---|
| Name | The name of the item. |
| Latin Name | The Latin name of the item. |
Double-click a row to load it into the editor for change. The items keep the order in which you added them.
The Ok button at the bottom returns the whole list to the field definition window. Close becomes Cancel after any change, and asks about ignoring when you close, if the warning option On cancel is on. The changes stay temporary until you save the field itself.
Messages
Messages have the title Error unless stated otherwise. Field errors (the name, required and unique values, the length limit) appear beside the field itself.
| Message | Why it appears | What to do |
|---|---|---|
| You have no permission | A permission check did not pass. | Ask the system administrator for the permission, or change the security level of a new document. |
| Current form is not related to document types | New in the list of a record whose type is not linked to a document type. | Link the type as in Link Records with Documents Types. |
| Invalid Type ID | New, and the list did not receive the record type in a valid form. | Close the window and open it again from the record. |
| Missing Name | The name is empty. | Type the name. |
| Maximum field characters length is 250 | A name or Latin name longer than 250 characters. | Shorten the text. |
| Field is required | A required field is empty. | Fill the field. |
| Field must be unique. | The value of a unique field exists in another document. | Change the value. |
| Document name is duplicated | Name is used by another document, and also when the database rejects it. | Change the name. |
| Document Latin name is duplicated | Latin Name is used by another document. | Change it. |
| No files found, do you want to continue? | Save a document that has no file. A warning with Yes and No. | Choose Yes to save the document without files, or No to add a file. |
| Error occurred while saving changes to the database. | The save failed for a reason other than a duplicate. The text of the error follows on a new line. | Try again. If it repeats, report the text to support. |
| Unable to complete operation, due to out of memory. | Saving very large files. | Save fewer files in one document. |
| Missing allowed file extensions in selected document type. To be able to add files, please add the allowed file types in Document Type Card. | Browse or Scan and the type has no allowed extensions. | Add the extensions in the Attached Document Type Card. |
| File type is not allowed. To add this file, file type must be defined in Document Type Card | The extension of the file is not allowed for the document type. The path of the file follows. | Add the extension in the document type card or pick another file. |
| File size is greater than maximum allowed size for this file type | The file is larger than the limit set for its extension. The path of the file follows, then two lines: File Size and Maximum Size in kilobytes. | Reduce the file size, or raise the limit in the document type card. |
| Error occurred while reading file | The program could not read the selected file. Its path follows. | Check that the file exists and is not locked. |
| The file is being used by another process. | View on a file already open in another program. | Close it in the other program. |
| No application found to open this files type. | No program is associated with the file extension in Windows. | Install a program for this extension. |
| Please note that any modification on the file will not be saved to Archive System because you don't have file modification permission | You opened a saved file and you do not have Edit File. A warning. | Do not change the file, or ask for the permission. |
| Please note that any modification on the file will not be saved to Archive System because file not stored in the database. If you want to save it to Archive System, please save it to document first then open and modify it. | You opened a file whose document is not saved yet. A warning. The text continues on a second line. | Save the document first. |
| Do you want to save file changes ? | You changed a saved file in its program and saved it. The title is Modify, and the message adds "File modified outside Al Ameen" with an explanation for Yes and No. | Yes saves the change in the archive at once, No ignores it. |
| Scan Failed. | The scan failed. The text of the error follows. | Check the scanner and its driver, then try again. |
| Opening Data Source Manager Failed. | The program could not connect to the TWAIN service. It shows in the message above. | Install the scanner driver. |
| Scanner is required | Ok in the scan window with no scanner. | Install or connect a scanner. |
| Format is required | The file format is empty in the scan window. | Choose a format. |
| Menu item value is duplicated | The name is used by another item of the list. | Change the name. |
| Item Latin name is duplicated | The Latin name is used by another item. | Change it. |
| List item is used in some documents. | Delete on an item that a document used. The message also has the line "List item cannot be deleted." | Keep the item. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.