Solved

FSM Mobile Sync Rules (Android 6u23)

  • 27 February 2023
  • 1 reply
  • 151 views

Userlevel 3
Badge +7
  • Sidekick (Customer)
  • 21 replies

I am attempting to sync a custom table with FSM Mobile, when using the database query option in IFS mobile (6u23) the result returns an error. I am confused as to why when analyzing the sync rule I am able to return values however not actually view them within mobile.

 

From the below is it possible to identify determine the source of the issue or is this better suited to a ticket?

 

Thanks!

 

Sync Rule: 

<hierarchy_select return_only_requested_attrs="true" max_rows="1000">
  <primary_table>TFI_WORK_NOTES_VIEW</primary_table>
  <from>
    <table>TFI_WORK_NOTES_VIEW</table>
  </from>
  <attrs>
    <attr>TFI_WORK_NOTES_VIEW.*</attr>
  </attrs>
  <where>
    <join_constraint>
    </join_constraint>
    <data_constraint>
    </data_constraint>
  </where>
</hierarchy_select>

Custom Metadata:

 

Log output:


02/27/23 10:39:44 AM|ERROR|com.metrix.architecture.utilities.MetrixActivityHelper:createActivityIntent|main|java.lang.ClassNotFoundException: com.metrix.metrixmobile.ApplicationSettings
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:454)
    at java.lang.Class.forName(Class.java:379)
    at com.metrix.architecture.utilities.MetrixActivityHelper.createActivityIntent(MetrixActivityHelper.java:231)
    at com.metrix.architecture.utilities.MetrixActivityHelper.createActivityIntent(MetrixActivityHelper.java:192)
    at com.metrix.metrixmobile.OptionsMenu.onOptionsItemSelected(OptionsMenu.java:242)
    at com.metrix.metrixmobile.system.MetrixActivity.onSlidingMenuItemClick(MetrixActivity.java:4460)
    at com.metrix.architecture.slidingmenu.MetrixSlidingMenuAdapter$SlidingMenuVH$1.onClick(MetrixSlidingMenuAdapter.java:89)
    at android.view.View.performClick(View.java:7792)
    at android.view.View.performClickInternal(View.java:7769)
    at android.view.View.access$3800(View.java:910)
    at android.view.View$PerformClick.run(View.java:30184)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8608)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
Caused by: java.lang.ClassNotFoundException: com.metrix.metrixmobile.ApplicationSettings
    ... 20 more


02/27/23 10:39:44 AM|ERROR|com.metrix.architecture.actionbar.MetrixActionBarManager:disableMenuButton|main|java.lang.NoSuchFieldException: No field sHasPermanentMenuKey in class Landroid/view/ViewConfiguration; (declaration of 'android.view.ViewConfiguration' appears in /system/framework/framework.jar!classes3.dex)
    at java.lang.Class.getDeclaredField(Native Method)
    at com.metrix.architecture.actionbar.MetrixActionBarManager.disableMenuButton(MetrixActionBarManager.java:104)
    at com.metrix.metrixmobile.system.MetrixActivity.onCreate(MetrixActivity.java:275)
    at com.metrix.metrixmobile.system.ApplicationSettings.onCreate(ApplicationSettings.java:89)
    at android.app.Activity.performCreate(Activity.java:8282)
    at android.app.Activity.performCreate(Activity.java:8262)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4005)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4197)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2434)
    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 android.app.ActivityThread.main(ActivityThread.java:8608)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)

icon

Best answer by jevin.fernando 27 February 2023, 17:20

View original

1 reply

Userlevel 1
Badge +6

Hello @ssabo I assume this is a SQL View. 

  1. I would recommend to have primary key(s) defined in the metadata. (assume this view is written from task notes. PKs →  task_id, task_text.text_sequence)
  2. In the XML query, please define where conditions. (what you have right now will push all the records present in that table to the mobile)

If you expect to have data in realtime, you will need to put this into the transactional tables related query. (you can refer the related query for baseline Sync Rule “task_attachment” )

Reply