Bug
SHOW_PAGE with $currentObject parameter binding in DATAGRID CONTROLBAR generates an invalid Mendix expression, causing CE0117.
MDL input
DATAGRID dgOrders (DataSource: DATABASE FROM MyModule.Order, Selection: Single) {
CONTROLBAR cb {
ACTIONBUTTON btnView (
Caption: 'View',
Action: SHOW_PAGE MyModule.Order_Detail(OrderParam: \$currentObject),
ButtonStyle: Primary
)
}
COLUMN colNum (Attribute: OrderNumber, Caption: 'Order')
}
Result
mxcli creates the page and button, but `mx check` reports:
```
CE0117 Error(s) in expression. Action button 'btnView' Page 'Order_Overview'
```
The generated parameter binding expression for `$currentObject` is invalid in the Mendix model.
Expected
The button should correctly pass the selected DATAGRID row to the target page parameter.
Copied from engalar#41
Comments from original issue
@engalar (2026-04-07T09:20:44Z):

@engalar (2026-04-07T09:27:41Z):
Update: Root cause identified
The issue is not with `$currentObject` per se — it's that inside a DATAGRID CONTROLBAR, there is no DataView context, so `$currentObject` is undefined.
Correct approach
When DATAGRID has `Selection: Single`, the selected row is accessible via the widget name as a variable:
DATAGRID dgOrders (DataSource: DATABASE FROM MyModule.Order, Selection: Single) {
CONTROLBAR cb {
ACTIONBUTTON btnView (
Caption: 'View',
-- Use \$dgOrders (widget name), NOT \$currentObject
Action: SHOW_PAGE MyModule.Order_Detail(OrderParam: \$dgOrders),
ButtonStyle: Primary
)
}
}
Suggestion
mxcli should either:
- Reject `$currentObject` in CONTROLBAR context with a clear error message pointing to the widget name variable
- Auto-resolve `$currentObject` to the DATAGRID widget name when inside a CONTROLBAR
Bug
SHOW_PAGEwith$currentObjectparameter binding in DATAGRID CONTROLBAR generates an invalid Mendix expression, causing CE0117.MDL input
Result
mxcli creates the page and button, but `mx check` reports:
```
CE0117 Error(s) in expression. Action button 'btnView' Page 'Order_Overview'
```
The generated parameter binding expression for `$currentObject` is invalid in the Mendix model.
Expected
The button should correctly pass the selected DATAGRID row to the target page parameter.
Copied from engalar#41
Comments from original issue
@engalar (2026-04-07T09:20:44Z):

@engalar (2026-04-07T09:27:41Z):
Update: Root cause identified
The issue is not with `$currentObject` per se — it's that inside a DATAGRID CONTROLBAR, there is no DataView context, so `$currentObject` is undefined.
Correct approach
When DATAGRID has `Selection: Single`, the selected row is accessible via the widget name as a variable:
Suggestion
mxcli should either: