Codeunit 18122337 EOS004 AppInsights Client
Provides access to Application Insights data. This client supports executing queries and also emitting events.
procedure GetConfigurationKeys(): List of [Text[250]]
List[Text]
procedure GetSecretConfigurationKeys(): List of [Text[250]]
List[Text]
procedure InitializeForPost(ConnectionString: Text)
Enables log posting to Application Insights.using the given connection string.
ConnectionString Text[]
The connection string to use.
procedure Initialize(ServiceConfig: Record "EOS004 Service Config.")
Initializes the client with the given service configuration.
ServiceConfig Record "EOS004 Service Config."
The service configuration.
procedure PostMessage(jo: JsonObject): Boolean
Post a message to Application Insights. Use ‘CreateMessage’ to create a message to be posted.
jo JsonObject
The message to post.
Returns Boolean
True if the message was posted successfully.
procedure PostMessage(ja: JsonArray): Boolean
Post multiple messages to Application Insights. Use ‘CreateMessage’ to create a message to be posted.
ja JsonArray
The messages to post.
Returns Boolean
True if the message was posted successfully.
procedure CreateMessage(Timestamp: DateTime;Message: Text;Verbosity: Verbosity;Properties: Dictionary of [Text, Text]) result: JsonObject
Create a message to be posted to Application Insights.
Timestamp DateTime
The timestamp of the message.
Message Text[]
The message to post.
Verbosity Verbosity
The verbosity of the message.
Properties Dictionary[Text,Text]
Additional properties to include in the message.
Returns JsonObject
The message as a JsonObject.
procedure RunQuery(QueryString: Text)
Executes the given query against Application Insights. This is a TryFunction.
QueryString Text[]
The query to execute.
procedure ListTables(): List of [Text]
Returns the list of tables that the last executed query has returned.
Returns List[Text]
The tables in the current result set.
procedure BeginTableRead(TableName: Text): Boolean
Loads the given table as the current table.
TableName Text[]
The name of the table to load.
Returns Boolean
Specifies whether the load was successful.
procedure GetFields(var TempField: Record "Name/Value Buffer")
Returns the list of columns that the current table has.
TempField Record "Name/Value Buffer"
The list of columns.
procedure GetValueAsText(ColumnName: Text): Text
Returns the value of the given column as Text.
ColumnName Text[]
The name of the column to get.
Returns Text[]
The value.
procedure GetValueAsText(ColumnName: Text; WithError: Boolean): Text
Returns the value of the given column as Text.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Text[]
The value.
procedure IsValueGuid(ColumnName: Text)
Checks if a column value is a valid GUID.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsGuid(ColumnName: Text): Guid
Returns the value of the given column as Guid.
ColumnName Text[]
The name of the column to get.
Returns Guid
The value.
procedure GetValueAsGuid(ColumnName: Text; WithError: Boolean): Guid
Returns the value of the given column as Guid.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Guid
The value.
procedure IsValueInt(ColumnName: Text)
Checks if a column value is a valid Integer.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsInt(ColumnName: Text): Integer
Returns the value of the given column as Integer.
ColumnName Text[]
The name of the column to get.
Returns Integer
The value.
procedure GetValueAsInt(ColumnName: Text; WithError: Boolean): Integer
Returns the value of the given column as Integer.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Integer
The value.
procedure IsValueDecimal(ColumnName: Text)
Checks if a column value is a valid Decimal.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsDecimal(ColumnName: Text): Decimal
Returns the value of the given column as Decimal.
ColumnName Text[]
The name of the column to get.
Returns Decimal
The value.
procedure GetValueAsDecimal(ColumnName: Text; WithError: Boolean): Decimal
Returns the value of the given column as Decimal.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Decimal
The value.
procedure IsValueDateTime(ColumnName: Text)
Checks if a column value is a valid DateTime.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsDateTime(ColumnName: Text): DateTime
Returns the value of the given column as DateTime.
ColumnName Text[]
The name of the column to get.
Returns DateTime
The value.
procedure GetValueAsDateTime(ColumnName: Text; WithError: Boolean): DateTime
Returns the value of the given column as DateTime.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns DateTime
The value.
procedure IsValueDateOnly(ColumnName: Text)
Checks if a column value is a valid Date.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsDateOnly(ColumnName: Text): Date
Returns the value of the given column as Date.
ColumnName Text[]
The name of the column to get.
Returns Date
The value.
procedure GetValueAsDateOnly(ColumnName: Text; WithError: Boolean): Date
Returns the value of the given column as Date.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Date
The value.
procedure IsValueBool(ColumnName: Text)
Checks if a column value is a valid Boolean.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsBool(ColumnName: Text): Boolean
Returns the value of the given column as Boolean.
ColumnName Text[]
The name of the column to get.
Returns Boolean
The value.
procedure GetValueAsBool(ColumnName: Text; WithError: Boolean): Boolean
Returns the value of the given column as Boolean.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Boolean
The value.
procedure IsValueTime(ColumnName: Text)
Checks if a column value is a valid Time.
ColumnName Text[]
The name of the column to check.
procedure GetValueAsTime(ColumnName: Text): Time
Returns the value of the given column as Time.
ColumnName Text[]
The name of the column to get.
Returns Time
The value.
procedure GetValueAsTime(ColumnName: Text; WithError: Boolean): Time
Returns the value of the given column as Time.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns Time
The value.
procedure GetValueAsObject(ColumnName: Text): JsonObject
Returns the value of the given column as JsonObject.
ColumnName Text[]
The name of the column to get.
Returns JsonObject
The value.
procedure GetValueAsObject(ColumnName: Text; WithError: Boolean): JsonObject
Returns the value of the given column as JsonObject.
ColumnName Text[]
The name of the column to get.
WithError Boolean
Specifies whether to throw an error if the column does not exist.
Returns JsonObject
The value.
procedure RowCount(): Integer
Returns the number of rows in the current result set.
Returns Integer
The number of rows.
procedure GetRow(NewRowIndex: Integer): Boolean
Loads the row with the given index as the current row.
NewRowIndex Integer
The index of the row to load.
Returns Boolean
True if the row was loaded successfully.
procedure GetNextRow(): Boolean
Loads the next row as the current row.
Returns Boolean
True if the row was loaded successfully.
procedure FormatDateQuery(FromDateTime: DateTime; ToDateTime: DateTime): Text
Formats a date query for the given date range.
FromDateTime DateTime
The start date and time.
ToDateTime DateTime
The end date and time.
Returns Text[]
The formatted date query.
procedure FormatDateQuery(FromDate: Date; ToDate: Date): Text
Formats a date query for the given date range (from 00:00 to 23:59).
FromDate Date
The start date and time.
ToDate Date
The end date and time.
Returns Text[]
The formatted date query.
procedure ReaderDialogIsOpen(): Boolean
Returns true if the reader dialog is open.
Returns Boolean
True if the reader dialog is open, false otherwise.
procedure DeserializeToRecordRef(var RecRef: Recordref)
Deserializes the current row to the given RecordRef by trying to find a field with the same name for each column.
Obsolete fields are excluded.
BLOB fields will be found, but by default no deserialization will happen. You must subscribe to OnDeserializeToRecordRefSetBlobValue
and handled BLOB fields explicitly.
There are DeserializeToRecordRef[xxx] events available to customize deserialization.
RecRef Recordref
The target RecordRef where field values will be written to.
procedure OpenReaderDialog()
Opens a read status dialog.
procedure StepReaderDialog()
Steps the read status dialog. This is called automatically when the dialog is open.
procedure CloseReaderDialog()
Closes the read status dialog.
local procedure OnDeserializeToRecordRefBeforeFindFieldNo(ColumnName: Text[250]; var RecRef: RecordRef; var FoundFieldNo: Integer)
ColumnName Text[250]
RecRef RecordRef
FoundFieldNo Integer
local procedure OnDeserializeToRecordRefBeforeSetFieldValue(ColumnName: Text[250]; var RecRef: RecordRef; var FldRef: FieldRef; TextValue: Text; var Handled: Boolean)
ColumnName Text[250]
RecRef RecordRef
FldRef FieldRef
TextValue Text[]
Handled Boolean
local procedure OnDeserializeToRecordRefAfterSetFieldValue(ColumnName: Text[250]; var RecRef: RecordRef; var FldRef: FieldRef; TextValue: Text)
ColumnName Text[250]
RecRef RecordRef
FldRef FieldRef
TextValue Text[]
local procedure OnDeserializeToRecordRefSetBlobValue(ColumnName: Text[250]; var RecRef: RecordRef; var FldRef: FieldRef; TextValue: Text; var Handled: Boolean)
ColumnName Text[250]
RecRef RecordRef
FldRef FieldRef
TextValue Text[]
Handled Boolean
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.