Object metadata not found for the given offline object

Hi All,

Building app with offline object. After launching app database schema created. When try to create object with var recordObj = new voltmx.sdk.VMXObj("report_health_issues");

I am using Iris Version 9.5.34 and Foundry Version V9 SP5 FP15 HF3

I am receiving following error message.

ErrorCode: 2333
ErrorDomain: OfflineObjectsError
ErrorMessage: Object metadata not found for the given offline object: report_health_issues
ErrorCode: 2333
ErrorCode: 2333
ErrorDomain: OfflineObjectsError
ErrorMessage: Object metadata not found for the given offline object: report_health_issues
ErrorCode: 2333
at sync.kony.com.syncv2library.Android.Setup.SetupManager.objectMetadataForSDKObjectName(SetupManager.java:291)
at sync.kony.com.syncv2library.Android.GenericObject.SDKObject.<init>(SDKObject.java:212)
at sync.kony.com.syncv2library.Android.SyncMFInterface.SDKObjectSync.<init>(SDKObjectSync.java:69)
at sync.kony.com.syncv2library.Android.SyncMFInterface.SDKObjectSync.<init>(SDKObjectSync.java:51)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at com.konylabs.vm.Function.executeJS(Native Method)
at com.konylabs.vm.Function.a(UnknownSource:141)
at com.konylabs.vm.Function.a(UnknownSource:137)
at com.konylabs.vm.Function.execute(UnknownSource:116)
at com.konylabs.vmintf.KonyJavaScriptVM.d(UnknownSource:565)
at com.konylabs.android.ar.handleMessage(UnknownSource:337)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at com.konylabs.android.af$a.run(UnknownSource:405)

Hi Suresh,

Can you provide more background and context of your offline voltmx.sdk.VMXObj method call?

Has your app performed an offline object setup (VMXFoundry.OfflineObjects.setup) on app init?

After which, has your app assigned the offline object reference via new voltmx.sdk.VMXObjSvc(<obj service name>) ?

Then finally as part of the offline object setup, has your app performed the object level "startSync", <<obj service name>>.startSync(params)?

The above assumed that your Foundry app has an offline enabled object service and the Foundry app is published.

Hi,

It is straightforward. I created one GET and one CREATE endpoint. The CREATE method expects 12 fields, with the primary key being a combination of three fields.

After linking the application with Foundry, I generated the model.

Upon launching the app, the sync database was created and data was fetched successfully, and the data is available in the sync database.

However, when I try to submit data, I receive a failure message.

Yes. App assigned the offline object reference via new voltmx.sdk.VMXObjSvc(<obj service name>).

Yes. Performed new voltmx.sdk.VMXObjSvc(<obj service name>) ?

Yes. Foundry app has an offline enabled object service and the Foundry app is published.

Hi Suresh,

Is "report_health_issues" your Volt Foundry's Object Service's "Data Model" name?

Below is an example snapshot of my Volt Foundry Object and data models. "dmParts" is a data model and should be the target of the code line: var recordObj = new voltmx.sdk.VMXObj("dmParts");