Skip to main content
Solved

Fsm Mobile Client script

  • December 1, 2023
  • 1 reply
  • 97 views

Forum|alt.badge.img+8
  • Sidekick (Customer)
  • 23 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

Best answer by Shneor Cheshin

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!

 

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

1 reply

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1139 replies
  • Answer
  • December 3, 2023

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


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