FindDocDefByRRef

Description

Searches an ECM document definition by table number, table document type and a start date (validity date) of a document definition (in the recent past).

Table number, table document type and start date are extracted from the MainRecord (Variant) using the "ECM Object Reference Matrix" facility.

Syntax

AL
[FoundDocDef:= ] FindDocDefByRRef(var ECMDocDef: Record "ECM Document Definition", MainRecord: Variant, PurposeofUse: Enum "ECM Purpose Of Use"[, ReportID: Integer] [,[ReporttoECMQueue: Enum "ECM Report to ECM Queue"] [, Blocked: Boolean] [, ECMSystem: Enum "ECM System"])


Parameters

Variable: ECMDocDef

Type: Record "ECM Document Definition"

This is the found ECM document definition that is returned.


MainRecord

Type: Variant

Table number, table document type and start date are extracted from this MainRecord (Variant) using the "ECM Object Reference Matrix" setup.


PurposeofUse

Type: Enum "ECM Purpose Of Use"

The Purpose of Use can be used to limit the search.


[Optional] ReportID

Type: Integer

Report ID is not used to search for an ECM document definition, but only to search for a different document category. If the field "Use passed report" has been checked in the ECM document definition, this report will be used for further processing.


[Optional] ReporttoECMQueue

Type: Enum "ECM Report to ECM Queue"

Filter on the field "Add report to ECM queue" in the ECM document definition. This filter is only used if "ECM Report to ECM Queue" is not empty.


[Optional] Blocked

Type: Boolean

Filter on the field "blocked" in the ECM document definition


[Optional] ECMSystem

Type: Enum "ECM System"

Filter on the field "ECM System" in the ECM document definition



Return Value:

FoundDocDef

Type: Boolean

True if the "ECM Document Definition" was found, otherwise False



Remarks:



Example: