<-- Back

Using restricted client APIs in nanoflows results in error: mx.data.get is disabled() or mx.data.commit is disabled()

Issue

In Native Mobile offline applications, when using a retrieve by association across a non-persistable entity and a persistable entity in a nanoflow with strict mode enabled, the following error occurs:

mx.data.get is disabled()

When committing a persistable entity under the same conditions, the following error occurs:

mx.data.commit is disabled()

These client application programming interfaces (APIs) interact with the client database. This behavior also applies to other Restricted Client APIs in strict mode.

Environment

  • Native Mobile
  • Studio Pro v11.12.4 and older
  • Studio Pro v11.6.11 and older
  • Studio Pro v10.24.26 and older

Cause

In strict mode, client APIs are restricted. This is intended to block Runtime calls.

In Native Mobile offline applications, the retrieve by association and commit actions in a nanoflow use mx.data.get and mx.data.commit. These actions interact only with the client database and do not make a Runtime call. Strict mode still disables both APIs, which causes the errors. This is an unintended limitation.

Solution / Workaround

This is fixed in Studio Pro v10.24.27, v11.6.12 and v11.12.5. Upgrade Studio Pro to one of these versions.

Internal information related

  • 282233, 287100
  • UFC-2243, UFC-2206
  • CJZ85RLTA/p1788530407033149, C09E8PXND0V/p1784116037937189 

Additional information

Mendix documentation: Restricted Client APIs

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.