Solved

Fsm Mobile Client script

  • 1 December 2023
  • 1 reply
  • 47 views

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

I would like to make a script to stop FSM mobile users from changing the task status field if they are current in process, or on route on a current task. 

To change statuses the users use the top left hand corner button to jump to the next status,

 

What would be the best approach to apply this in FSM Mobile (android) 6u24

icon

Best answer by Shneor Cheshin 4 December 2023, 00:29

View original

1 reply

Userlevel 6
Badge +26

Hi @ssabo 

A client script should work.

Disable the status update quick action button when conditions are met.

On the refresh script of [SCREEN]

  • Run SQL query to check the status of assigned/dispatched jobs
  • If one of the jobs is in progress, and the job ID is not the current one
  • Disable control - setControlEnabled("QUICK_ACTIONBAR_STATUS", false);

Please note there was a bug with setControlEnabled("QUICK_ACTIONBAR_STATUS", false) function in upd24/25 and it got fixed in the recent UPD26. This is relevant for iOS, might be the same for Android. The bug was - simply the function did not work and the control was not getting disabled.

Cheers!

 

Reply