KVSKBADispatchInterfaceLib
Procedures
PrintShipments(Record KVSKBAPostedDispatchHandHeader, Boolean) :
Summary: Prints the shipment documents (sales, service, transfer or return) linked to the posted dispatch handling header.
procedure PrintShipments(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; ShowReportRequestPage: Boolean):
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header to print shipments for.ShowReportRequestPage: Indicates whether the report request page should be shown.
Remarks: This procedure retrieves the posted dispatch handling lines associated with the provided header and determines the source type of each line. Based on the source type, it filters the corresponding shipment header records and prints the shipment documents. The procedure supports sales, service, transfer, and return shipments.
FindPostedShipmentLines(Record KVSKBAPostedDispatchHandHeader, Record KVSKBAPostedDispatchHandlLine, Text) : Boolean
Summary: Finds posted dispatch handling lines with a source shipment for the given header and builds a filter text of the related source document numbers.
procedure FindPostedShipmentLines(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; var PostDispHandlingLine: Record "KVSKBAPostedDispatchHandlLine"; var NoFilterTxt: Text): Boolean
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header to find lines for.PostDispHandlingLine: Returns the found posted dispatch handling lines.NoFilterTxt: Returns a filter text of the distinct source document numbers.
Returns: True if matching lines were found, otherwise false.
Remarks: This procedure retrieves the posted dispatch handling lines associated with the provided header and checks for lines that have a source shipment. If such lines are found, it constructs a filter text containing the distinct source document numbers, which can be used for further processing or filtering.
FindPostedInvoiceLines(Record KVSKBAPostedDispatchHandHeader, Record KVSKBAPostedDispatchHandlLine, Text) : Boolean
Summary: Finds posted dispatch handling lines with a posted invoice for the given header and builds a filter text of the related invoice numbers.
procedure FindPostedInvoiceLines(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; var PostDispHandlingLine: Record "KVSKBAPostedDispatchHandlLine"; var NoFilterTxt: Text): Boolean
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header to find lines for.PostDispHandlingLine: Returns the found posted dispatch handling lines.NoFilterTxt: Returns a filter text of the distinct posted invoice numbers.
Returns: True if matching lines were found, otherwise false.
Remarks: This procedure retrieves the posted dispatch handling lines associated with the provided header and checks for lines that have a posted invoice. If such lines are found, it constructs a filter text containing the distinct posted invoice numbers, which can be used for further processing or filtering.
PrintInvoices(Record KVSKBAPostedDispatchHandHeader, Boolean) :
Summary: Prints the invoice documents (sales or service) linked to the posted dispatch handling header.
procedure PrintInvoices(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; ShowRequestReportPage: Boolean):
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header to print invoices for.ShowRequestReportPage: Indicates whether the report request page should be shown.
Remarks: This procedure retrieves the posted dispatch handling lines associated with the provided header and determines the source type of each line. Based on the source type, it filters the corresponding invoice header records and prints the invoice documents. The procedure supports sales and service invoices.
Events
OnBeforeInsertJobQueueAutoUpdateDispatchProviderEntry(Enum KVSKBA Dispatch Provider, Boolean, Boolean) :
Summary: Event raised before inserting a job queue entry for auto updating the dispatch provider entry status.
[IntegrationEvent(false, false)]
local procedure OnBeforeInsertJobQueueAutoUpdateDispatchProviderEntry(DispatchProvider: Enum "KVSKBA Dispatch Provider"; var ReturnValue: Boolean; var IsHandled: Boolean):
Parameters:
DispatchProvider: The dispatch provider enum value.ReturnValue: The return value indicating whether to create the job queue entry.IsHandled: Indicates whether the event was handled.
Remarks: This event allows subscribers to customize the behavior before inserting a job queue entry for auto updating the dispatch provider entry status. Subscribers can modify the ReturnValue to control whether the job queue entry should be created. If IsHandled is set to true, the default logic will be skipped.
OnBeforeSendShipments(Record KVSKBAPostedDispatchHandHeader, Boolean, Boolean) :
Summary: Event raised before sending shipments.
[IntegrationEvent(false, false)]
local procedure OnBeforeSendShipments(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; var ShowRequestPageWhenPrint: Boolean; var IsHandled: Boolean):
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header.ShowRequestPageWhenPrint: Indicates whether the report request page should be shown when printing.IsHandled: Indicates whether the event was handled. If set to true, the default logic will be skipped.
Remarks: This event allows subscribers to customize the behavior before sending shipments. Subscribers can modify the ShowRequestPageWhenPrint parameter to control whether the report request page should be shown when printing. If IsHandled is set to true, the default logic will be skipped.
OnBeforeSendInvoices(Record KVSKBAPostedDispatchHandHeader, Boolean, Boolean) :
Summary: Event raised before sending invoices.
[IntegrationEvent(false, false)]
local procedure OnBeforeSendInvoices(PostedDispatchHandHeader: Record "KVSKBAPostedDispatchHandHeader"; var ShowRequestPageWhenPrint: Boolean; var IsHandled: Boolean):
Parameters:
PostedDispatchHandHeader: The posted dispatch handling header.ShowRequestPageWhenPrint: Indicates whether the report request page should be shown when printing.IsHandled: Indicates whether the event was handled. If set to true, the default logic will be skipped.
Remarks: This event allows subscribers to customize the behavior before sending invoices. Subscribers can modify the ShowRequestPageWhenPrint parameter to control whether the report request page should be shown when printing. If IsHandled is set to true, the default logic will be skipped.