project QadFinancials > class BBankNumber > method ValidateComponentCompanySS

Description

Validates CompanySharedSet
Note: work with t_sBankNumber buffer


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BBankNumber.ValidateComponentBeforeAncestor


program code (program1/bbanknumber.p)

assign vcMessage = "":U.
/*error: CompanySharedSet_Id not defined for a GL bank accounts (mandatory)*/
if (t_sBankNumber.CompanySharedSet_ID = 0 or 
    t_sBankNumber.CompanySharedSet_ID = ?) and
    t_sBankNumber.BankNumberParentType = {&BANKNUMBERPARENTTYPE-GL} 
then do:
    assign vcMessage = trim(substitute(#T-2'You must specify a valid entity for a bank number &1 linked to GL bank account &2.':200(387)t-2#, 
                            t_sBankNumber.BankNumber,
                            t_sBankNumber.tcParentObjectCode))
           oiReturnStatus = -1.
    <M-1 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  'tBankNumber.tcCompanyCode':U (icFieldName),
                     input  t_sBankNumber.tcCompanyCode (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  'BankNumber.tc_Rowid':U (icRowid),
                     input  'QADFIN-1058':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BBankNumber>
end.