KVSKBA Dispatch Provider Entry
Fields
| Name | Type | Note |
|---|---|---|
| Entry No. | Integer | |
| Document No. | Code[20] | |
| Table | Integer | |
| Dispatch Provider | Text[50] | |
| Action | Text[20] | |
| Creation Date | DateTime | |
| Provider Type | Enum (KVSKBA Dispatch Provider) | |
| Log Entry Errors | Integer | FlowField |
| Status | Enum (KVSKBADispProviderEntryStatus) |
Procedures
Add(Variant, Integer, Integer, Text, Boolean) : Boolean
Summary: Adds a new entry to the dispatch provider log with the specified details. This procedure is typically called by dispatch providers to log actions taken for specific documents, along with the provider type and any relevant details. The procedure retrieves the document number and provider type from the specified record and field numbers, creates a new log entry with the provided action text and current timestamp, and inserts it into the table. The runTrigger parameter determines whether any triggers on the table should be executed during the insert operation.
procedure Add(documentRec: Variant; documentNoFieldNo: Integer; dispatchProviderFieldNo: Integer; actiontext: Text; runTrigger: Boolean): Boolean
Parameters:
documentRec: The record containing the document for which the log entry is being created. This is passed as a variant to allow for flexibility in the type of record.documentNoFieldNo: The field number on the document record that contains the document number to be logged.dispatchProviderFieldNo: The field number on the document record that contains the dispatch provider type to be logged.actiontext: A text description of the action being logged, which will be stored in the "Action" field of the log entry.runTrigger: A boolean value indicating whether to execute triggers on the table during the insert operation. If true, any triggers defined on the "KVSKBA Dispatch Provider Entry" table will be executed when the new log entry is inserted.
Returns: Returns true if the log entry was successfully added; otherwise, returns false if there was an issue retrieving the document number or provider type from the specified record and field numbers.
Remarks: This procedure is designed to be flexible and can be called from various contexts where logging of dispatch provider actions is needed. By passing the document record and field numbers as parameters, it allows for dynamic retrieval of the necessary information without hardcoding specific table or field references, making it adaptable to different document types and provider implementations.