Create objects offline from javascript

3
Normally you are able to use the mx.data.create function in javascript. How will this perform when you are using your app in offline mode? Will it still require you to be online or are you able to create entities while being offline?
asked
2 answers
3

To create offline objects mx.data.create is indeed the correct api to use. This will create an object and store it in the local database on your device. When synchronizing this object will be synchronized to the server as well. There is a constraint, and that is the entity you are creating the object for must be used somewhere in your offline pages, e.g. in a listview. The reason for this is that we are only creating tables in the offline database for entities you actually use in you offline pages.

answered
1

I'm not sure if you are referring to mobile offline apps. But the mx.data.create function makes a call to the server to check the permissions of the object against the current user to see if they are allowed to make this object.

I have not tested this on Mendix Mobile Offline. But at least on Hybrid and desktop applications this function would need a connection.

answered