This topic has not yet been rated - Rate this topic

SysDictClass::invokeStaticMethodIL Method [AX 2012]

Runs the specified method and makes sure that the method is executed under X++ IL.

server public static container invokeStaticMethodIL(
    ClassName _className, 
    MethodName _methodName, 
    container _params, 
   [boolean _ignoreTtsLevel])

Run On

Server

Parameters

_className
Type: ClassName Extended Data Type
The name of the class that contains the method.
_methodName
Type: MethodName Extended Data Type
The static method to invoke.
_params
Type: container
A container that contains the parameters to pass to the method.
_ignoreTtsLevel
Type: boolean
A Boolean value that indicates whether to force to IL even if the TTS level is larger than 0; optional.

Return Value

Type: container
A container that contains the result of the method invocation.

This method demands the XppILExecutePermission class and asserts both the RunAsPermission class and the ExecutePermission class. The invocation will transition to X++ IL by using the RunAs function if it is running as interpreted. If it is already running as X++ IL, the method is invoked directly.

As there may be some overhead, this method should only be used on computationally-extensive methods.

This method will not transition to IL if the current TTS level is larger than zero (unless forced) because the transaction scope does not flow across IL boundaries.

Did you find this helpful?
(1500 characters remaining)