🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators ExecuteAction
This page was created by Lars.olofsson on 2020-06-23. Last edited by Restore-user on 2026-10-21.

The ExecuteAction operator is used to invoke the logic of a ViewModel Action via OCL/EAL. This is particularly useful for reusing logic that is already defined in your UI layer or for triggering complex processes from a generic controller.

It allows you to target a specific action by identifying its nesting level and the name of the column (Action) you wish to run.

selfVM.ExecuteAction(<nameofNesting in viewmodel>,<Name of action>)

The action is executed regardless of the disable/visible expression. Thus, when you do this from code, you must ensure that you apply any enable rules yourself (this is a good thing because sometimes you may want to do one thing from code and another from the UI or ServerSide execution).�0

Example

If you have a ViewModel with a nested grid for Orders and a column action named vApproveOrder.

selfVM.ExecuteAction('Orders', 'vApproveOrder')

Result: The logic defined in the vApproveOrder action for the selected row in the 'Orders' nesting is executed.