Description
Validates User relation in case the employee is a user.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bemployee.p)
/* In case the User flag is set the Usr Name has to be filled in */
if t_sEmployee.Usr_ID = ? or
t_sEmployee.Usr_ID = 0
then do:
assign vcMessage = trim(substitute(#T-2'The employee is a user and must, therefore, be linked to a system user (employee: &1).':200(1827)T-2#, trim(t_sEmployee.EmployeeCode))).
<M-1 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tEmployee.tcUsrLogin':U (icFieldName),
input string(t_sEmployee.tcusrLogin) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sEmployee.tc_Rowid (icRowid),
input 'QADFIN-1597':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BEmployee>
assign oiReturnStatus = min(-1, viFcReturnSuper).
end.