WriteLog

Description

Writes a record into the table ECM Log incl. file from the buffer TempBlob

Writes a record to the table ECM Log incl. XML Document

Writes a record into the table ECM Log incl. stream (http response)

Syntax

AL
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger): Integer
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger; PageID: Integer): Integer
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger; var TempBlob: Codeunit "Temp Blob"; Filename: Text): Integer
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger; var JObject: JsonObject; Filename: Text): Integer
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger; var resDom: XmlDocument; Filename: Text): Integer
WriteLog(MessageValue: Text; MsgText: Text; MsgCode: Integer; MessageType: Enum "ECM Message Type"; RecRelatedVariant: Variant; ECMDocEntryNo: Integer; TransactionNo: BigInteger; var responseStream: InStream; Filename: Text): Integer


Parameters

MessageValue

Type: Text

Contains the message value.

E.g.: "Archive %1 cannot be found". %1 corresponds to the message value "Sales documents" RESULT: "Archive sales documents cannot be found".


MsgText

Type: Text

Contains the message text (free text) and is outputed in the "Message 2" field of the ECM log.


MsgCode

Type: Integer

Contains the message code of the ECM message code unit.

The value "1" stands for a general ECM error.

If the value "0" is transferred, processing has been completed without errors and the message is logged exclusively.

If a number is passed that is not contained in the ECM messages, then a MessageCode with "Unknown error" is passed. e.g. "9999" leads to the output "Unknown error: 9999".


MessageType

Type: Enum "ECM Message Type"

Enthält die Art der Meldung Information, Warnung oder Fehler .


RecRelatedVariant

Type: Variant

The linked RecRelatedVariant (record) is entered in the ECM log entries.

Tip: The RecRelatedVariant can be passed as Record, RecordID, RecordRef or Empty Text (no record).


ECMDocEntryNo

Type: Integer

Contains the document item number or can be passed empty.


TransactionNo

Type: BigInteger

Contains the transaction number of the ECM queue entry.


[Optional] PageID

Type: BigInteger

Passes the page ID associated with the RecRelatedRecord, i.e. the associated page of the record that is being processed.


[Optional] Variable: TempBlob

Type: Codeunit "Temp Blob"

The file to be logged is entered as BLOB.


[Optional] Variable: JsonObject

Type: Json Object

The file to be logged is entered as a Json object.


[Optional] Variable: resDom

Type: XmlDocument

The file to be logged is entered as an XML document.


[Optional] Variable: responseStream

Type: InStream

The file to be logged is entered as http response stream.


[Optional] Filename: Text

Type: Text

Contains the file name of the file that will be entered into the ECM log entries.



Return Value:

Type: Integer

Is the entry number of the ECM log entry.



Remarks:



Example: