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


To remove the button, we need to follow mentioned steps:
Navigate to Windows(OPTH)->Screens(PTH1).
- Add an “Init Button” field action to the NBLIG field as shown in Figure 3.
- Add a specific action (SPE) so that it is applied to the relevant script (SPEPTH).
- Implement the code as shown in Figure 4.


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 ).

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