Codeunit WSB_DigiDocQueueMgt
Provides functionality for adding and processing Document Mail Queue Entries.
Properties
Methods
wgFncDrillDownToLastQueueEntryForSourceDocument
DrillDown to the last Document Mail Queue entry of a given document.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document to drilldown for. |
wgFncDrillDownToQueueEntriesForSourceDocument
DrillDown to the Document Mail Queue entries for a document.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document to drilldown for. |
wgFncDrillDownToQueueEntriesForSourceDocument
DrillDown to the Document Mail Queue entries for a document filtered on entry status.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document to drilldown for. |
Enum "WSB_DigiDocQueueStatus" |
pStatus |
The entry status to filter on. |
wgFncFinChrgMemoIssueDigiDocQueueDocument
Called when issueing a Fin. Charge Memo\ Adds an entry to the Document Mail Queue with status "new"
Parameters
Type |
Name |
Description |
Code[20] |
pIssuedFinChargeMemoNo |
Parameter of type Code[20]. |
wgFncGetNumberOfQueueEntriesForSourceDocument
Gets the number of Document Mail Queue entries for a document.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document to drilldown for. |
Returns
Type |
Description |
Integer |
The number of queue entries. |
wgFncGetNumberOfQueueEntriesForSourceDocument
Gets the number of Document Mail Queue entries for a document filtered on entry status.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document to drilldown for. |
Enum "WSB_DigiDocQueueStatus" |
pStatus |
The entry status to filter on. |
Returns
Type |
Description |
Integer |
The number of queue entries. |
wgFncGetNumberOfQueueEntriesText
Gets a text that shows the number of Document Mail Queue entries. The text shows (1) The number of sent entries; (2) The number of canceled entries; (3) The total number of entries.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
Parameter of type Variant. Should be a record. |
Returns
Type |
Description |
Text |
Return value of type Text. |
wgFncGetStatusOfLastQueueEntryForSourceDocument
Gets the status of the last Document Mail Queue Entry of a given document.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
Parameter of type Variant. Should be a record. |
Returns
Type |
Description |
Enum WSB_DigiDocQueueStatus |
The status of the queue entry |
wgFncGetStatusPictureForQueueEntry
Gets the status picture for a queue entry. Used on the Document Mail Queue page.
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
vRecQueueEntry |
The queue entry to get the picture for. |
Record "WSB_DigiDocStatusPicture" |
vRecStatusPicture |
The status picture. |
wgFncProcessQueueEntry
Processes the queue entries in the filter of the passed record variable. This method will skip queue entries with errors. If any errors occur, they will be stored in table WSB_DigiDocMessage.
wgFncQueueDocument
Adds a new queue entry for the passed document record to the Document Mail Queue with the output format being set to the default "Mail with PDF".
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document record (e.g., a RecordRef, RecordID) |
Returns
Type |
Description |
Boolean |
true iff the queue entry was added successfully. |
wgFncQueueDocument
Adds a new queue entry to the Document Mail Queue.
Parameters
Type |
Name |
Description |
RecordId |
pRecordID |
Specifies the record ID of the document that can be sent via this queue entry. |
Code[20] |
pDocumentNo |
Specifies the document no. of the document that can be sent via this queue entry. |
Enum "Report Selection Usage" |
pReportUsage |
Specifies the report selection usage that applies for the new queue entry. |
Integer |
pSourceType |
Specifies the type of the source entity. |
Code[20] |
pSourceNo |
Specifies the no. of the source entity (e.g., customer no., vendor no.) |
Code[10] |
pLanguageCode |
Specifies the language code to set on the new queue entry. |
Boolean |
pOnHold |
Specifies whether status of the new queue entry should be set to "On Hold". |
Returns
Type |
Description |
Boolean |
true iff the queue entry was added successfully. |
wgFncQueueDocumentWithFeedback
Adds a new queue entry to the Document Mail Queue and asks for confirmation if an entry for the same document is already present in the mail queue.
Parameters
Type |
Name |
Description |
RecordId |
pRecordID |
Specifies the record ID of the document that can be sent via this queue entry. |
Code[20] |
pDocumentNo |
Specifies the document no. of the document that can be sent via this queue entry. |
Enum "Report Selection Usage" |
pReportUsage |
Specifies the report selection usage that applies for the new queue entry. |
Integer |
pSourceType |
Specifies the type of the source entity. |
Code[20] |
pSourceNo |
Specifies the no. of the source entity (e.g., customer no., vendor no.) |
Code[10] |
pLanguageCode |
Specifies the language code to set on the new queue entry. |
Boolean |
pOnHold |
Specifies whether status of the new queue entry should be set to "On Hold". |
Returns
Type |
Description |
Boolean |
true iff the queue entry was added successfully. |
wgFncQueueDocumentWithFeedback
Adds a new queue entry for the passed document record to the Document Mail Queue and asks for confirmation if an entry for the same document is already present in the mail queue.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The document record (e.g., a RecordRef, RecordID) |
Returns
Type |
Description |
Boolean |
true iff the queue entry was added successfully. |
wgFncShowMailQueueEntries
Shows the Document Mail Queue Entries for a specific document.
Parameters
Type |
Name |
Description |
RecordId |
pDocumentRecordID |
The RecordID of the document to show the Document Mail Queue entries for. |
wgFncShowSourceDocumentForQueueEntry
Opens the source document of record, based on the DocumentRecordId.\ For Example: Posted Sales Invoice
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
pRecQueueEntry |
The queue entry to show the source document for. |
wgFncUpdateCreatedFieldsForQueueEntry
Sets the Created By with current UserID and Created On with current DateTime on the given record.
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
vRecQueueEntry |
Parameter of type Record WSB_DigiDocQueue. |
wgFncUpdateModifiedFieldsForQueueEntry
Sets the Modified By with current UserID and Modified On with current DateTime on the given record.
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
vRecQueueEntry |
The queue entry to update. |
wlEvpOnAfterProcessQueueEntry
Allows one to hook into the moment right after queue entries have been processed.
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
vRecQueueEntry |
The queue entry records that were processed. |
Integer |
pProcessed |
The number of queue entries that were processed. |
Integer |
pFailed |
The number of queue entries that were processed unsuccessfully. |
wlEvpOnAfterSuccessfulCreateEntries
Event is raised when an entry is succesful added to the Document Mail Queue called from procedure wgFncQueueDocument
Parameters
Type |
Name |
Description |
RecordId |
pRecordID |
The record ID of the document for which a queue entry is added. |
Code[20] |
pDocumentNo |
The document no. of the document. |
Enum "Report Selection Usage" |
pReportUsage |
The report selection usage. |
Integer |
pSourceType |
The ID of the database table of the entity/business relation for which the queue entry is added.. |
Code[20] |
pSourceNo |
The no. of the entity/business relation. |
Code[10] |
pLanguageCode |
The language code. |
Boolean |
pOnHold |
Whether the queue entry should be set On Hold |
Code[20] |
pDocSendProfileCode |
The document sending profile code. |
wlEvpOnBeforeProcessQueueEntry
Allows one to hook into the moment right before queue entries are being processed.
Parameters
Type |
Name |
Description |
Record "WSB_DigiDocQueue" |
vRecQueueEntry |
The queue entry records that should be processed. |
wlEvpOnBeforeQueueDocument
Event is raised before an entry is added to the Document Mail Queue called from wgFncQueueDocument
Parameters
Type |
Name |
Description |
RecordId |
pRecordID |
The record ID of the document for which a queue entry is added. |
Code[20] |
pDocumentNo |
The document no. of the document. |
Enum "Report Selection Usage" |
pReportUsage |
The report selection usage. |
Integer |
pSourceType |
The ID of the database table of the entity/business relation for which the queue entry is added.. |
Code[20] |
pSourceNo |
The no. of the entity/business relation. |
Code[10] |
pLanguageCode |
The language code. |
Boolean |
pOnHold |
Whether the queue entry should be set On Hold |
Boolean |
vSuccess |
Set this parameter to specify if your event subscriber handled the action successfully. |
Boolean |
vIsHandled |
Set this parameter to specify if your event subscriber handled the action. |