Skip to main content
Solved

Trigger Sync Rule from mobile on demand


Forum|alt.badge.img+3

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,

Best answer by Shneor Cheshin

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!

View original
Did this topic help you find an answer to your question?

5 replies

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1147 replies
  • Answer
  • August 20, 2023

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!


Forum|alt.badge.img+3

Hey @Shneor Cheshin 

 

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


Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1147 replies
  • August 21, 2023

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!


Forum|alt.badge.img+3

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)?? 


Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1147 replies
  • August 21, 2023

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings