SaveAndSendDialog

Description

Displays a selection dialog for sending and/or filing a document.


Syntax

AL
[ErrorCode:= ] SaveAndSendDialog(var ECMDocDef: Record "ECM Document Definition"; MainRecordVariant: Variant; var Selected: Integer)


Parameters

Variable: ECMDocDef

Type: Record "ECM Document Definition"

ECM document definition for the record. The correct document definition for the record is searched with the API function FindDocDefByRRef


MainRecordVariant

Type: Variant

MainRecord (record) is entered into the ECM queue and is needed for processing (metadata and PDF creation).

Tip: The MainRecord can be passed as Record, RecordID or RecordRef.


Variable: Selected

Type: Integer

Contains the selected option:

  • [1] a PDF will be created and added to the ECM queue.

  • [2] a PDF will be created and sent as e-mail

  • [3] a PDF is created, added to the ECM queue and sent as an email

  • [4] a PDF is created, added to the ECM queue, sent as email and printed



Return Value:

ErrorCode

Type: Integer

ErrorCode = 0 and TransactionNo <> 0 if the operation was successful.

With the function ShowMessage the ErrorCodes can be displayed and with the function WriteLog they can be logged.



Remarks:



Example: