Description
Validates that project code exists.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bemployee.p)
/* Only check for valid project code if value is set */
if(t_sEmployee.tcProjectCode <> "" and t_sEmployee.tcProjectCode <> ?) then do:
<Q-2 assign vlFcQueryRecordsAvailable = ProjectByProjectCode (NoCache) (input viCompanyId, (CompanyId)
input t_sEmployee.tcProjectCode, (ProjectCode)) in BProject >
if(not vlFcQueryRecordsAvailable) then do:
vcMessageText = #T-1'The project ($1) is not defined in the system.':150(31061)t-1#.
<M-3 run SetMessage (input vcMessageText (icMessage),
input t_sEmployee.tcProjectCode (icArguments),
input 'ProjectCode':U (icFieldName),
input t_sEmployee.tcProjectCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '' (icRowid),
input 'QadFin-4667':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BEmployee>
oiReturnStatus = -1.
return.
end. /* if(not vlFcQueryRecordsAvailable */
end. /* if(t_sEmployee.tcProjectCode */