project QadFinancials > class BBudgetLinkActual > method ValidateComponent

Description

Write here all tests on database update (new / modify / delete) that cannot be coded with a validation mask.
The type of update can be found in tc_status (N/C/D).
If you find incorrect data, you must write an entry in tFcMessages (using SetMessage) and set the return status of this method to either +1 or -1.
Return status +1 = data will still be accepted.
Return status -1 = data will not be accepted.
This method is run from SetPublicTables, before transferring the received data into the class temp-tables.


Parameters


oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bbudgetlinkactual.p)

/* ====================================================== */
    /* Make sure to start without any old reference instances */
    /* ====================================================== */
    <M-6 run StopExternalInstances  (output viFcReturnSuper (oiReturnStatus)) in BBudgetLinkActual>
    
    
    /* ================================================================ */
    /* Field BudgetLinkActualIsAfterRep was set to ? in InitialValues.  */ 
    /* We will assign it here for the records were the value is still ? */
    /* ================================================================ */

    for each t_sBudgetLinkActual where 
             t_sBudgetLinkActual.BudgetLinkActualIsAfterRep  = ? and 
             t_sBudgetLinkActual.tc_Status                  <> "D":U: 
        if t_sBudgetLinkActual.BudgetLinkActualPrjCode = "":U or 
           t_sBudgetLinkActual.BudgetLinkActualPrjCode = ?
        then do :
             assign t_sBudgetLinkActual.BudgetLinkActualIsAfterRep = false.
             next.
        end. /* if t_sBudgetLinkActual.BudgetLinkActualPrjCode = "":U or */
    end. /* for each */

<ANCESTOR-CODE>