Adding a field to Address Tab on Customers (GESBPC)
Resolution
You have to declare 2 fields in the screen BPABPC [BPAC]
For exemple, we add ZTEST field as below :
1) In BPABPC screen , you have to declare 2 fields:
- ZTEST in the block 1 with input "Hidden"
- XZTEST in the block 2 with input "Enter"
For the field XZTEST, you have to manage an action SPE : "After Change" with this code :
Script SPEBPA :
###################
$ACTION
Case ACTION
When default
Endcase
Return
Subprog AM_XZTEST(VALEUR)
Variable Char VALEUR()
[M]ZTEST([M]XNUMLIG) = VALEUR
[M]FLMOD([M]XNUMLIG) = 1
End
########################
2) And you have to manage entry point "REMP_ADRBPA" from TRTBPA like below :
########################
$ACTION
Case ACTION
When "REMP_ADRBPA" : Gosub REMP
Endcase
Return
#--------------------------------------------------
# For populate specific fields [M]Xzone
# from field [M]zone(NOL)
#-----------------------------------------
$REMP
If dim([M]XZTEST)>0
[M]XZTEST = [M]ZTEST(NOL)
Endif
Return
3) You have to add ZTEST in BPADDRESS table.