Skip to content

KVSMEDInfoRequestOutputLib#

Procedures#

PreviewInfoRequest(Record KVSMEDInfoRequestHeader, Boolean) :#

Summary: Previews an information request document using the configured preview report. This procedure displays the information request in preview mode, allowing users to review the document before final processing. It handles both report-based previews and document attribute previews based on the communication document configuration.

procedure PreviewInfoRequest(var KVSMEDInfoRequestHeader: Record "KVSMEDInfoRequestHeader"; ShowError: Boolean): 

Parameters:

  • KVSMEDInfoRequestHeader: The information request header record to preview.
  • ShowError: Indicates whether to show error messages during preview generation.

InfoRequestHeaderUpdateAddFieldsByReportIDAndCommit(Record KVSMEDInfoRequestHeader, Integer) :#

Summary: This function makes it possible to run the function InfoReqHeaderUpdateAddFieldsByReportID in Codeunit KVSMEDInfoRequestAddFieldsLib followed by a Commit()

procedure InfoRequestHeaderUpdateAddFieldsByReportIDAndCommit(var KVSMEDInfoRequestHeader: Record "KVSMEDInfoRequestHeader"; ReportID: Integer): 

Parameters:

  • KVSMEDInfoRequestHeader:
  • ReportID:

Events#

OnBeforeSendInfoRequestToPrinter(Record KVSMEDInfoRequestHeader, Record KVSMEDCommunicationDocument, Boolean) :#

Summary: This integration event is triggered before sending an information request to the printer. This event allows subscribers to implement custom logic before the information request is sent to the printer. If the event is handled by a subscriber (IsHandled is set to true), the default printing logic will be bypassed.

[IntegrationEvent(false, false)]
local procedure OnBeforeSendInfoRequestToPrinter(var KVSMEDInfoRequestHeader: Record "KVSMEDInfoRequestHeader"; var KVSMEDCommunicationDocument: Record "KVSMEDCommunicationDocument"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSMEDInfoRequestOutputLib", 'OnBeforeSendInfoRequestToPrinter', '', false, false)]
local procedure DoSomethingOnBeforeSendInfoRequestToPrinter(var KVSMEDInfoRequestHeader: Record "KVSMEDInfoRequestHeader"; var KVSMEDCommunicationDocument: Record "KVSMEDCommunicationDocument"; var IsHandled: Boolean)
begin
end;

Parameters:

  • KVSMEDInfoRequestHeader: The record of type KVSMEDInfoRequestHeader that holds the header information of the information request.
  • KVSMEDCommunicationDocument: The record of type KVSMEDCommunicationDocument that holds the document information related to the communication.
  • IsHandled: A boolean flag that indicates whether the event has been handled by a subscriber. If set to true, the default handling of the event will be skipped.