During development it happens often that we need to call a screen from another screen and pass some fields to the called screen from the caller. In Sage X3 to meet this requirement we need to use the Action option.
But what if we need to call the same screen from multiple numbers of screens and every time the caller screen is different and thus writing code to fetch the values from every caller screen will be cumbersome. In such case X3 provides an important feature which allows passing parameters to the Action.
Below is the simple example for defining, initializing and passing parameters for the action.
Step 1- Defining the parameters for the action. In below screen shot you can see parameters have been defined for the action.
Step 2- Add the button under the “Buttons/Menu” of the window of the caller screens and then add the action defined above against the button. Check the screen shot below.
Step -3 Since we have added the action for the button the action parameters will be seen in the Grid listed on Window screen. Below screen shot shows the parameters which are automatically added by system. Now here we can initialize the values for it.
Step 4 – Now similarly for every window we just need to add the button and change the Parameters Value needed from the particular window.