Description
Actions to take before writing current instance to the database (inside the db transaction!).
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/bbankentry.p)
<ANCESTOR-CODE>
for each tbankstate where
tBankState.tc_Status = "N":U
no-lock :
<M-92 run GetBankStateID
(input tBankState.Company_ID (iiCompanyID),
input tBankState.tcGLCode (icGLCode),
input tBankState.BankStateYear (iiBankStateYear),
input tBankState.BankStateNumber (icBankStateNumber),
output viBankState_ID (oiBankStateID),
output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
if viBankState_ID <> 0 /* on or many found */
then do:
assign oiReturnStatus = -1
vcMessage = trim(substitute(#T-4'The bank state number you entered already exists. Enter a different number.':200(64333)t-4#, tBankState.BankStateNumber)).
<M-3 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tBankState.BankStateNumber':U (icFieldName),
input tBankState.BankStateNumber (icFieldValue),
input 'W' (icType),
input 3 (iiSeverity),
input tBankState.tc_Rowid (icRowid),
input 'QadFin-6772':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
end.
end.