Solved

Remove the Post Button from the OOB FSM Mobile Stock Count Screen

  • 8 January 2021
  • 3 replies
  • 162 views

Userlevel 2
Badge +3

Hi,

Can we remove the post button from the Out of the Box FSM Mobile Stock Count Screen? As we don’t want our technician to post the stock Count.

Can we do this with the New custom screen? 

Any help would be much appreciated !!!

icon

Best answer by josdepijper 12 January 2021, 10:43

View original

This topic has been closed for comments

3 replies

Userlevel 5
Badge +12

Hi @arti.sagar ,

 

I am not sure for this screen, but you might be able to do this doing the following:

  1. with the mobile device navigate to the screen which you wish to adjust,
  2. then open the menu by pressing the upper right button in this screen
  3. then choose the menu option ‘Design screen’
  4. then below in you screen, choose the option in the middle named ‘View Items’
  5. it will show your ‘Post’ button. Select it.
  6. uncheck the ‘Active’ field to deactivate the button. 
  7. Press save and close the designer screen via the menu
    1. again upper right menu button
    2. choose the ‘Close’ option

There are some screens which doesn't allow you to deactivate this type of buttons (i.e. the ‘Next’ and ‘Save’ button in the ‘DebriefCustomerSignature’ screen). In that case an option could be to enhance the client script for the ‘Post’ button. You can then validate if the user is allowed to post and if not, then return a message and return a false result for the validation script to prevent that the ‘Post’ action is executed. It could look like below example.

var value01 = getControlValue('person','user_def1');


if (value01 == 'N') {
alert('You are not allowed to Post.');
return false;
}
else {
return true;
}

 

Userlevel 2
Badge +3

Hi @josdepijper,

Thanks for your reply,

But in this case when I check the View Items section for StockCountPartList Screen, it's completely Blank, with No Post Button. In that case, how would I call the Client Script to put the Validation?

I believe Post Button is coming from the source code layout file, not from Screen Item. In the Mobile client customization I can remove that Post Button from the code itself, but was looking something from the Mobile designer Side, don't want to touch the code.

Below is Screen Shot for you reference. 

 

Userlevel 5
Badge +12

You are right. I forgot to mention that you can add some buttons and have validation on those. In this case you could add the Save button, so that the user can Save instead of posting. However then still your Post button will stay visible, since it looks like its really cooked in the code of this particular screen. 

Maybe you can try to overide the FSM Client Script ‘STOCKCOUNT_POST_RUN’ with a (Custom) Client Script and add some extra conditions to it. However I do not know if the Mobile is running the same code. I am thinking... probably not.  

If that also not helps (or when you in anyway really want to get rid of that button) you should try to build your own custom screen for this usecase.