Question

FSM Mobile Scripting - goToScreen function

  • 7 February 2020
  • 3 replies
  • 183 views

Userlevel 1
Badge +6

I have this simple script;

 

alert("Trying to go to DebriefOV");
goToScreen('DebriefOverview',false);
/* To be: C_opportunity_details */

 

The above code works OK.

If I try to change the Screen name to my custom screen ‘C_opportunity_details’ - nothing happens.

 

Please help.


3 replies

Userlevel 6
Badge +21

gotoscreen command works only with correct screen name and it should have a load function. if your screen is not accessible via any menu type, you cannot do this. Please check direct access to page via menu is working. if it works it is matter with screen name. it is not mandatory to give second parameter if you do not want to close the current activity. 

How to get the name of the screen:

  1. got the actual screen from the mobile. eg DebriefPartUsageType
  2. go to Help from  global menu ( gray coloured side menu)
  3. here you can see the correct name of the screen. ( at the bottom )

Create client script

  1. Go to smart client->client script screen
  2.  command goToScreen("DebriefPartUsageType");

How to get script to mobile

  1. go to Mobile app, ->Designer
  2. Refresh script
  3. set your script to button

These are the steps and it should work. 

Note:

Please double check your screen is accessible through any menu (global, home or workflow). 

If this does not work, please add screenshot of help of the screen, screen properties, your client script and place where you use it.

 

Userlevel 1
Badge +6

Hello and thanks for your reply.

What do you mean by ‘3. set your script to button’?

I have set the screen as a menu element (global menu), and it does not work. So this might be an answer to my problems. I am not able to see what I am doing wrong.  I have added the screenshots of the screen_definition and script as requested.

 

Bertel

Userlevel 6
Badge +21

yes. if you screen is not possible to open via menu without using Client script, it may have a error on a screen. you can see it by checking the mobile log( make sure to get debug log ). 

Reply