Global::infologLine Method [AX 2012]

Gets the number of lines in the Infolog buffer.

client server public static int infologLine()

Run On

Called

Return Value

Type: int
The number of lines in the Infolog buffer.

This method has similar functionality to the xInfo.line method, but it improves performance and lowers network load when you are executing server-side code.When the xInfo.line method is run on the server, it makes a call to the client to retrieve the number of lines in the Infolog buffer. The xGlobal::infologLine method retrieves the server-side Infolog buffer line count.

This eliminates the requirement to call to the client. When the xGlobal::infologLine method is called on the client, it returns the count directly from the Infolog buffer on the client.This method is especially useful when you write server-side code that processes exceptions.The number of lines in the Infolog is generally stored before entering a try / catch block.If an exception occurs, the number of lines that were previously stored is used to determine which messages were logged during the code in the try block. If no exceptions occur, the stored Infolog buffer line count is often unused. If you use the xGlobal::infologLine method instead of the xInfo.line method to retrieve the Infolog lines, a round-trip to the client is prevented.

Show: