Loads and executes the unit of C/AL code you specify. To use this function, you can specify a C/SIDE table associated with the codeunit when you defined the codeunit properties. This allows you to pass a variable with the function. The transaction that the codeunit contains is always committed due to the Boolean return value.

[Ok :=] Codeunit.RUN(VAR Record)

Parameters

Codeunit

Type: Codeunit

Identifies the unit of code you want to run.

VAR Record

Type: Record

This parameter is not always optional. If you specify a C/SIDE table associated with the codeunit, you can select a record. If you do not specify a table, you cannot specify a record. However, you must use this parameter to select a record if you attached a record to the codeunit when you defined its properties.

This parameter is a record data type.

Expand imageProperty Value/Return Value

Expand imageExample

Expand imageSee Also