How to hide the button in line level of grid in sage X3

By | January 30, 2025

In Sage X3, we came across a situation where we need to hide a button at the line level within a grid. This functionality can be achieved by following the steps given below.

In our example, the user wants to hide the “Change of Receipt” button at the line level (as shown in Figure 1) for a specific transaction type, i.e RET (Return GRN) as shown in Figure 2.

New Stuff: How to print comments data longer than 250 characters on Crystal Reports at once in Sage X3

Receipt Screen
Receipt Screen
Transaction List
Transaction List

To remove the button, we need to follow mentioned steps:

Navigate to Windows(OPTH)->Screens(PTH1).

  1. Add an “Init Button” field action to the NBLIG field as shown in Figure 3.
  2. Add a specific action (SPE) so that it is applied to the relevant script (SPEPTH).
  3. Implement the code as shown in Figure 4.
screen
screen
Script code
Script code

Here
Within this action,
[V]GBOUTX, where GBOUT is the keyword used for button and X represents the button number
(i.e 5 – (Change of Receipt) in our case ).

Receipt Screen Without Button
Receipt Screen Without Button

As shown in above Figure 5 we have hide the button on Receipt screen for return transaction.

[about_us_blog_common]