Skip to content

CALL JAVASCRIPT ACTION with entity <> parameter — CE1613 at mxbuild #1785

Open

Description

@acarum

Component: mxcli exec — JavaScript action parameter serialization
Version: 11.12.4
Severity: High — check and exec both succeed silently; CE1613 only surfaces at mxbuild

Expected behavior: exec resolves the MDL entity identifier ("CustomModule"."NPActivity") to the model's internal entity reference (GUID) and writes it correctly into the .mpr.

Actual behavior: exec writes the MDL string literal "CustomModule"."NPActivity" — including the MDL double-quotes — verbatim into the entity reference field. mxbuild then looks up an entity with that literal name (quotes included) and fails with:

▎ [CE1613] "The selected entity '"CustomModule"."NPActivity"' no longer exists." at Call JavaScript action activity 'Refresh entity'

Minimal repro:

mdl
mdl 1;

CREATE OR MODIFY NANOFLOW "CustomModule"."TEST_RefreshEntity_NF" (
$Obj: "CustomModule"."NPActivity"
)
BEGIN
$r = CALL JAVASCRIPT ACTION "NanoflowCommons"."RefreshEntity" (
EntityToRefresh = "CustomModule"."NPActivity"
);
RETURN;
END;

./mxcli check test.mdl -p Project.mpr # ✅ passes
./mxcli exec test.mdl -p Project.mpr # ✅ exit 0, nanoflow created
./mxcli docker check -p Project.mpr # ❌ CE1613

JS action involved: NanoflowCommons.RefreshEntity — parameter EntityToRefresh: entity <> not null

Root cause (observed): The entity <> parameter type in CALL JAVASCRIPT ACTION is not resolved to an internal model reference at exec time. mxcli stores the raw MDL identifier string instead of the entity GUID, producing a dangling reference that mxbuild cannot resolve.

Environment
mxcli version: 0.26.0
Mendix model version: 11.12.4
OS: Windows 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions