Hi All,
am hoping someone can give me some advice on where I'm going wrong...
I have a bespoke field on the PIH1 screen that reads and writes to the db as required. What I want to happen is when I open the screen that if this field is populated and there is an invoice number to grey out the field.
The most logical action I can think of to place my relatively simple code is against the LIENS action (or the VERROU action) as I have seen this done in many places around the system, but no matter what I try, it does not work. I can get this to work just fine on various screen actions, this is not a problem, I just want it to grey the field out on loading of the screen. Here is the code I have added to SPEPIH:
$ACTION
Case ACTION
When "VERIF_CRE" : Gosub VERIF_CRE
When "VERIF_MOD" : Gosub VERIF_MOD
When "LIENS" : Gosub LIENS
When default
Endcase
Return
######################################
$LIENS
#Gosub LIENS From SUBPIHA
#Dbgaff
If [F:PIH]NUM <> "" & [F:PIH]YSENTAPPTO <> ""
Diszo [M:PIH1]YSENTAPPTO
Affzo [M:PIH1]YSENTAPPTO
Else
Actzo [M:PIH1]YSENTAPPTO
Endif
Return
Thanks in advance,
Joe