Codeunit 18122026 EOS Adv Mail Sandbox
Codeunit 18122026 EOS Adv Mail Sandbox
Methods
SetAdvDocRequestToProcess
procedure SetAdvDocRequestToProcess(Set: Record "EOS AdvDoc Request")
Parameters / Return Value
- Set
Record "EOS AdvDoc Request"
SetAdvDocDocumentToProcess
procedure SetAdvDocDocumentToProcess(Set: Record "EOS AdvDoc Documents")
Parameters / Return Value
- Set
Record "EOS AdvDoc Documents"
GenerateSingleDocument
procedure GenerateSingleDocument(var AdvDocDocuments: Record "EOS AdvDoc Documents")
Parameters / Return Value
- AdvDocDocuments
Record "EOS AdvDoc Documents"
GetReportADRCompliant
procedure GetReportADRCompliant(ReportID: integer) Result: Boolean
this method lets you know if a report is ADR compliant by also raising the OnGetReportSupportCustomReportDocument event
Parameters / Return Value
ReportID
integer
Report to analyze
Returns
Boolean
Return True if ReportID is ADR compatible Report.
Events
OnOpenRecordRefToPrint
local procedure OnOpenRecordRefToPrint(AdvDocDocuments: Record "EOS AdvDoc Documents";var TempReportSelection: Record "Report Selections";var DocumentToPrint: RecordRef;var Handled: Boolean)
This event allows you to print a different record than expected. For example, pass a “customer” record filtered appropriately in place of the document that you originally wanted to print
Parameters / Return Value
AdvDocDocuments
Record "EOS AdvDoc Documents"
Reference to the original record to be printed
TempReportSelection
Record "Report Selections"
Current Report Selection
DocumentToPrint
RecordRef
Open this recordref and apply filters. This record will be passed to the report.
Handled
Boolean
Return true to override default recordref and use instead returned DocumentToPrint recordref.
OnAfterSingleDocumentGeneration
local procedure OnAfterSingleDocumentGeneration(var AdvDocFiles: Record "EOS AdvDoc Files";ReportSelections: Record "Report Selections";var SkipFile: Boolean)
This event is raised after every document (pdf,xml,docx,xmlx)
Parameters / Return Value
AdvDocFiles
Record "EOS AdvDoc Files"
Created file as blob with all references to request and document table.
ReportSelections
Record "Report Selections"
Current “Report Selections” source
SkipFile
Boolean
you can prevent this file from being added by setting skip to true.
OnAfterAddNewFile
local procedure OnAfterAddNewFile(AdvDocDocuments: Record "EOS AdvDoc Documents";var ReportSelections: Record "Report Selections";var DocumentToPrint: RecordRef)
This event is raised when a file is successfully added to processing. it is a wind of notification only..
Parameters / Return Value
AdvDocDocuments
Record "EOS AdvDoc Documents"
Record “EOS AdvDoc Documents”
ReportSelections
Record "Report Selections"
Current “Report Selections” source
DocumentToPrint
RecordRef
Current record source
OnAfterLoadingReportSelection
local procedure OnAfterLoadingReportSelection(var AdvDocRequest: Record "EOS AdvDoc Request";AdvDocDocuments: Record "EOS AdvDoc Documents";var TempReportSelections: Record "Report Selections";var SkipDocumentPrinting: Boolean)
Thid event is raised when a report selection list is retrived. You can add, modify or delete records inside this TempReportSelections list customizing report printing/document generation behaviour.
Parameters / Return Value
AdvDocRequest
Record "EOS AdvDoc Request"
The current PDFQueue request
AdvDocDocuments
Record "EOS AdvDoc Documents"
Reference to the original record to be printed
TempReportSelections
Record "Report Selections"
Current Report Selection
SkipDocumentPrinting
Boolean
OnBeforeSandboxProcessing
local procedure OnBeforeSandboxProcessing(var AdvDocRequest: Record "EOS AdvDoc Request";var Handled: Boolean)
Event raised at the beginning of sandboxing execution. Every error raised inside this event is logged. You can use this event to handle custom -RequestType- processing returning Handled to true
Parameters / Return Value
AdvDocRequest
Record "EOS AdvDoc Request"
The current PDFQueue request
Handled
Boolean
Return true to skip standard sandbox processing
OnAfterSandboxProcessing
local procedure OnAfterSandboxProcessing(var AdvDocRequest: Record "EOS AdvDoc Request")
Event raised at the end of sandboxing execution. Every error raised inside this event is logged.
Parameters / Return Value
AdvDocRequest
Record "EOS AdvDoc Request"
The current PDFQueue request
OnGetReportSupportCustomReportDocument
local procedure OnGetReportSupportCustomReportDocument(ReportID: integer; var CustomReportSupported: boolean)
This event is raised when ADR need to know if a report supports “AdvRptSharedMemory.GetCustomReportDocument” pattern If you clone a standard ADR report to custom range you must subscribe this event.
Parameters / Return Value
ReportID
integer
Report ID Number.
CustomReportSupported
boolean
Return true if the report support CustomReportDocument method.
OnBeforePrintDocument
local procedure OnBeforePrintDocument(var AdvDocDocuments: Record "EOS AdvDoc Documents";var AdvDocFiles: Record "EOS AdvDoc Files";var TempReportSelections: Record "Report Selections";var ApplyCustomLayout: Boolean;DocumentRecRef: RecordRef;var Handled: Boolean)
OnBeforePrintDocument is reased before the default ADR file generation (pdf/word/excel) is taking place. You can skip file creation or add custom logics.
Parameters / Return Value
AdvDocDocuments
Record "EOS AdvDoc Documents"
Reference to the original record to be printed.
AdvDocFiles
Record "EOS AdvDoc Files"
Created file as blob with all references to request and document table.
TempReportSelections
Record "Report Selections"
The report selection to use for printing the document.
ApplyCustomLayout
Boolean
Gets or sets if any custom layout should be applied, if one is specified. This defaults to false.
DocumentRecRef
RecordRef
The current record to be printed.
Handled
Boolean
Gets or sets if this event has been handled.
OnAfterPrintDocument
local procedure OnAfterPrintDocument(var AdvDocDocuments: Record "EOS AdvDoc Documents"; var AdvDocFiles: Record "EOS AdvDoc Files"; var TempReportSelections: Record "Report Selections"; DocumentRecRef: RecordRef)
OnBeforePrintDocument is reased after file generation by ADR or inside OnBeforePrintDocument.
Parameters / Return Value
AdvDocDocuments
Record "EOS AdvDoc Documents"
Reference to the original record to be printed
AdvDocFiles
Record "EOS AdvDoc Files"
Created file as blob with all references to request and document table. This record is not yet in the database
TempReportSelections
Record "Report Selections"
Current Report Selection
DocumentRecRef
RecordRef
Current Document
OnBeforeCustomReportSelectionFilter
local procedure OnBeforeCustomReportSelectionFilter(var SourceType: Integer;var SourceNo: Code[20];DocumentRecRef: RecordRef;ReportID: Integer;var IsHandled: Boolean)
Parameters / Return Value
SourceType
Integer
SourceNo
Code[20]
DocumentRecRef
RecordRef
ReportID
Integer
IsHandled
Boolean
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.