project QadFinancials > class BPaymentSelection > method ValGLID

validation procedure


Parameters


icTargetFieldinputcharacterValue of the business field to validate.
icTargetFieldNameinputcharacterName of the business field to validate.
icRowidinputcharacterContents of field tc_Rowid, if the target field is a field of a component temp-table.
ilGLIsActiveinputlogical
icGLTypeCodeinputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
validation on relation GLINPAYSEL


program code (program4/bpaymentselection.p)

if ilGLIsActive <> true
then do:
    <M-1 run SetMessage (input  trim(#T-1'You can only specify active GL accounts.':250(16065)t-1#) (icMessage), 
                     input  '':U (icArguments), 
                     input  icTargetFieldName (icFieldName), 
                     input  icTargetField (icFieldValue), 
                     input  'E':U (icType), 
                     input  3 (iiSeverity), 
                     input  icRowid (icRowid), 
                     input  'QADFIN-3858':U (icFcMsgNumber), 
                     input  '':U (icFcExplanation), 
                     input  '':U (icFcIdentification), 
                     input  '':U (icFcContext), 
                     output viFcReturnSuper (oiReturnStatus)) in BPaymentSelection>

    assign oiReturnStatus = -1.
end.

if icGLTypeCode <> {&GLTYPECODE-BANK}
then do:
    <M-2 run SetMessage
          (input  trim(#T-2'You can only specify GL accounts of type '$1'.':250(16066)t-2#) (icMessage), 
           input  {&GLTYPECODE-BANK-TR} (icArguments), 
           input  icTargetFieldName (icFieldName), 
           input  icTargetField (icFieldValue), 
           input  'E':U (icType), 
           input  3 (iiSeverity), 
           input  icRowid (icRowid), 
           input  'QADFIN-3859':U (icFcMsgNumber), 
           input  '':U (icFcExplanation), 
           input  '':U (icFcIdentification), 
           input  '':U (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in BPaymentSelection>

    assign oiReturnStatus = -1.
end.