Skip to main content

Hi,

How I can create button as ‘sync now’ in mobile which technician can call the ‘PART’ sync rule. 

‘Part’ sync rule having ‘sync now’ button in FSM Smart client. Same functionality I want to achieve in Mobile via client script. 

 

Best Regards,

Hey @Akifscommunity 

I did not try this myself. But:

  1. Create an XML BR.
  2. When the rule is triggered an XML runs
      <perform_replication_for_table>
    <parameters>
    <table_name>PART</table_name>
    </parameters>
    </perform_replication_for_table>
    That should do the trick.

Cheers!


Hey @Shneor Cheshin 

 

But how we can trigger this from mobile app whenever required??


Hey @Akifscommunity 

Update a value on any table you wish and that update will trigger the BR.

I would create a custom table for that purpose.

Cheers!


Hi @Shneor Cheshin 

All good!!

Can we try this by another way just like using executePerform function with perform_replication_for_table into client script??

 

If Yes, then how (please provide code for understanding)?? 


Hey @Akifscommunity 

executePerform is not supported by the mobile client.

You will need your action to reach the FSM Server. So the options I can think of are:

  • Update a field on a screen
  • Use setDBValue ← Edit. Not relevant, according to documentation: This updated value is not synced back to the application server. If you need the value synced back to the application server, use the saveDataTransaction function
  • Use generateDataTransaction/saveDataTransaction

Cheers!


Reply