Description

Shows a dialog to send and/or store the document.

Syntax

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


Parameters

Variable: ECMDocDef

Typ: Record "ECM Document Definition"

ECM Document Definition for the record. The document definition for the record can be found with API Function FindDocDefByRRef.


MainRecorddVariant

Typ: Variant

MainRecord (Record) will be added to ECM Queue and used for processing (metadata and PDF creation).

MainRecord can be a record, record id or RecordRef.

Variable: Selected

Typ: Integer

Contains the selected version:

  • [1] a PDF will be created and added to ECM Queue
  • [2] a PDF will be created and sent by e-mail
  • [3] a PDF will be created, added to ECM Queue and sent by e-mail
  • [4] a PDF will be created, added to ECM Queue and sent by e-mail and printed



Return value:

ErrorCode

Typ: Integer

ErrorCode = 0 and TransactionNo <> 0, if successful

With function ShowMessage ErrorCodes can be shown and with function WriteLog these can be logged.