ShowDocument

Description

The respective document is searched for and displayed for the specified document reference.


Syntax

AL
[ErrorCode:= ] ShowDocument(ECMServerCode: Code[20]; ECMRepositoryID: Text; ECMRepositoryRef: Text; ECMDocRef: Text; DocumentID: Text; FileName: Text; FileHandling: Enum "ECM FileHandling"; OpenDocumentsVia: Enum "ECM open Documents via"; DocumentView: Enum "ECM Document View"; OnError: Enum "ECM OnError")
 
[ErrorCode:= ] ShowDocument(ECMServerCode: Code[20]; ECMRepositoryID: Text; ECMRepositoryRef: Text; ECMDocRef: Text; DocumentID: Text; FileName: Text; var TmpEmailInfo: Record "ECM E-Mail Info"; FileHandling: Enum "ECM FileHandling"; OpenDocumentsVia: Enum "ECM open Documents via"; DocumentView: Enum "ECM Document View"; OnError: Enum "ECM OnError")


Parameters

ECMServerCode

Type: Code

Contains the ECM Server Code.


ECMRepositoryID

Type: Text

Contains the ECM Repository ID. This variable can be passed empty.


ECMRepositoryRef

Type: Text

Contains the ECM Repository Reference. This variable can be passed empty.


DocumentID

Type: Text

Contains the Document ID. This variable can be passed empty.


FileName

Type: Text

Contains the file name under which the file is stored locally (download). If "empty", the file name from the repository is used.


[Optional] Variable: TmpEmailInfo

Type: Record "ECM E-Mail Info" temporary

Record containing the e-mail information of the recipient to whom the document should be sent, if any.


FileHandling

Type: Enum "ECM FileHandling"

Defines what happens to the file that is downloaded from the repository.

  • [1] Open

  • [2] Print

  • [3] EMail

  • [4] "Internal EMail"

  • [5] Save


[Optional] OpenDocumentsVia

Type: Enum "ECM open Documents via"

Defines how the downloaded document should be opened:

Corresponds to the field "Open documents by" of the ECM User card


[Optional] DocumentView

Type: Enum "ECM Document View"

Defines how the downloaded document should be opened:

Corresponds to the field "document view" of the ECM User card


OnError

Type: Enum "ECM OnError"

This variable defines how to proceed in the event of an error.

  • [1] Message: Outputs the last error message as a message.

  • [2] Error: Outputs the last error as an error.

  • [3] Exit: Suppresses the error message and terminates processing without error.


.



Return Value:

ErrorCode

Type: Integer

ErrorCode = 0, if process was successful.



Remarks:



Example: