How to add selection screen on field action

By | November 30, 2020

In Sage X3 , selection screen on a particular field helps users to search easily and select as per the requirement.

In Sage x3, If user want search selection should be there on any field, then it is easy if we are directly using custom data type for the same, but if we have used data type as “A(alphanumeric)”, and we are expecting that selection search screen should be there so that we can easily select the data for the field as per our need. In that case this blog is very helpful for you.

For example, On the screen , user wants search selection screen on “From Journal Number” field, and user is expecting journal no and description should be displayed on that screen to fulfil the requirement follow below steps to add selection search screen on field action:

Step 1:
Go to India pack module -> GL Voucher
As shown in the below screenshot, field “From Journal Number” is already added on screen and we need to add selection search screen on tab of “From Journal Number” field.

New Stuff: Division Wise Product Restriction on Sales Order

Print Screen
Print Screen

Step 2:
Go to Development -> Script Dictionary -> Action
create action “ZGL”.

Action Dictionary
GUMU Integration App

Add this action on field action as “ZGL”.

Screen Dictionary
Screen Dictionary

Step 3:
Go to Development -> Script
add code into the “SPEZGL” script.

TIT(1) = ‘Journal Entry No.’ : #N
TIT(2) = ‘Description’ : #N

REQUEST(0) =”Select DISTINCT NUM_0,DESVCR_0 from “+nomap+”.GACCENTRY “
FOR (CHAR NUM_0 (250), CHAR DESVCR_0 (250)) FROM “5” Sql REQUEST As [YCHD]

I += 1
TEX(I) = num$([YCHD]NUM_0 )
TEXTE(I,1) = num$([YCHD]NUM_0 )
TEXTE(I,2) = num$([YCHD]DESVCR_0 )
If I = 10000
Break
Endif
Next

Step 4:
Go to India pack Module -> GL Voucher
Now we can see on the tab of field, one selection screen displays.

Output
Output

In this way , we can add selection search screen on any custom field, when user tabs on “From Journal no” field the above selection screen gets open for searching as shown in the screenshot.