project QadFinancials > class BDebtor > method CloseExternalInstances


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BDebtor.AdditionalUpdates


program code (program1/bdebtor.p)

/* ====================================================================================== *
 * Method       : CloseExternalInstances                                                  *
 * Description  : This method is used to close opened instances of the related components *
 * -------------------------------------------------------------------------------------- *
 * Parameters   :                                                                         *
 * ====================================================================================== */
 
MAIN_BLOCK:
do on error undo, return:
    
    assign oiReturnStatus      = -98
           viLocalReturnStatus = 0.
           
    /* ================================================================= *
     * BBusinessRelation component                                       *
     * ================================================================= */           
    if valid-handle(vhBBankNumber4Inst)
    then do:
        <I-70 {bFcCloseInstance
             &CLASS           = "BBankNumber"}>
    end.
    
    /* ================================================================= *
     * BMfgCustomer component                                            *
     * ================================================================= */
    if valid-handle(vhBMfgCustomerInst)
    then do:
        <I-26 {bFcCloseInstance
             &CLASS           = "BMfgCustomer"}>
    end.
    
    /* ================================================================= *
     * BDebtorShipTo component                                           *
     * ================================================================= */
    if valid-handle(vhBDebtorShipToInst)
    then do:
        <I-75 {bFcCloseInstance
             &CLASS           = "BDebtorShipTo"}>
    end.
    
    /* ================================================================= *
     * BDebtorEndUser component                                          *
     * ================================================================= */
    if valid-handle(vhBDebtorEndUserInst)
    then do:
        <I-46 {bFcCloseInstance
             &CLASS           = "BDebtorEndUser"}>
    end.
end. /* MAIN_BLOCK */

assign oiReturnStatus = viLocalReturnStatus.