Triggering windows and passing data from main window in Sage X3

By | March 28, 2023

In Sage X3, sometimes it requires us to link a pop-window from a button and display information based on a particular record. To achieve this requirement, let us take you through a simple and effective process provided by Sage X3 as shown:

We’ll be referencing the following screen from Sage X3 for this:

Product Master: All > Common Data > Product (GESITM)
Functions: All > Development > Script Dictionary > Functions (GESAFC)
Actions: All > Development > Script Dictionary > Actions (GESACT)
Windows: All > Development > Script Dictionary > Windows (GESAWI)
Screen: All > Development > Script Dictionary > Screens (GESAMK)

Refer the screenshots for reference:

We first showcase a custom screen we created as shown below Fig. 1:

New Stuff: Workflow Monitor allows any user to sign for Approval

Fig 1. Custom Window & Screen created
Fig 1. Custom Window & Screen created

This custom Window is a dialog box type so we can use it as a pop-up window. Now we need an Action code for the same.

Fig 2. Custom Action code for Window entry
Fig 2. Custom Action code for Window entry

The Action code is created using a Window Entry type template and there we link the main window as our custom window code as shown in Fig. 2, once done we’ll be adding a Parameter code below and keeping it as By Address option as shown in Fig. 3

Fig 3. Parameter for Window Action
Fig 3. Parameter for Window Action

After this the action code needs to be linked to the respective button on which we need the window to be called upon as shown in Fig. 4.

Fig 4. Linking Custom Action code with passed parameter value
Fig 4. Linking Custom Action code with passed parameter value

Now we can make use of the passed parameter value using PARAM(indice) for accessing and reading tables and fetching useful data on a custom screen to display as shown in Fig. 5.

Fig 5. Snippet for DEBUT action on Window Action script
Fig 5. Snippet for DEBUT action on Window Action script

All that is left is Validating the windows involved and testing out the button functionality as shown in Fig. 6 & Fig. 7.

Fig 6. Button on Product master window
Fig 6. Button on Product master window
Fig 7. Passed Product code and fetching required data
Fig 7. Passed Product code and fetching required data

This is how calling pop-up windows works within Sage X3 in providing open record specific data.