project QadFinancials > class BEmployee > method ValidateBusinessKey

Description

Validate on BusinessKey


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BEmployee.ValidateComponent


program code (program1/bemployee.p)

for each tEmployee where tEmployee.tc_Status = 'C':U,
    each t_iEmployee where t_iEmployee.tc_rowid=tEmployee.tc_rowid and
        t_iEmployee.EmployeeCode <> tEmployee.EmployeeCode:
    assign
        vcMessageText = #T-1'Cannot change key field value.':30(17937)T-1#
        oiReturnStatus = -1.
    <M-2 run SetMessage (input  vcMessageText (icMessage), 
                     input  '' (icArguments), 
                     input  'EmployeeCode':U (icFieldName), 
                     input  tEmployee.EmployeeCode (icFieldValue), 
                     input  'E':U (icType), 
                     input  3 (iiSeverity), 
                     input  '' (icRowid), 
                     input  'QadFin-5238':U (icFcMsgNumber), 
                     input  '' (icFcExplanation), 
                     input  '' (icFcIdentification), 
                     input  '' (icFcContext), 
                     output viFcReturnSuper (oiReturnStatus)) in BEmployee>
    return.
end. /* for each tEmployee */