FindDocDefByName

Description

Searches a document definition by the specified name and a start date (validity date) of a document definition (in the recent past).


Syntax

AL
[FoundDocDef:= ] FindDocDefByRRef(var ECMDocDef: RecordĀ "ECM Document Definition", DocDefName: Text; PurposeofUse: EnumĀ "ECM Purpose Of Use", MainRecord: Variant, ReportID: Integer)


Parameters

Variable: ECMDocDef

Type: Record "ECM Document Definition"

This is the found ECM document definition that is returned.


DocDefName

Type: Text

Filter on the "Document Definition Name" field in the ECM document definition.


PurposeofUse

Type: Enum "ECM Purpose Of Use"

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


MainRecord

Type: Variant

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


[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.



Return Value:

FoundDocDef

Type: Boolean

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



Remarks:

This function is intended for special project requirements. By default, the FindDocDefByRRef function should be used to find a matching ECM document definition by table ID.

Example: