project QadFinancials > class BMfgCustomer > method StopExternalInstances

Description

Stop instances that are started in AdditionalUpdates as part of current transaction


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BMfgCustomer.AdditionalUpdates
method BMfgCustomer.ValidateComponent


program code (program/bmfgcustomer.p)

/* ============================================================================= *
 * BMfgAddress                                                                   *
 * ============================================================================= */
if viBMfgAddressID <> ? and 
   viBMfgAddressID <> 0 and
   vlIsBMfgAddrStHrBMfgCu
then do:
    if valid-handle(vhBMfgAddressInst)
    then do:
        <I-36 {bFcCloseAndStopInstance
             &CLASS           = "BMfgAddress"}>
    end.
    else do:
        <I-45 {bFcStopInstance
             &CLASS           = "BMfgAddress"}>
    end.
    assign viBMfgAddressId        = 0
           vlIsBMfgAddrStHrBMfgCu = false
           vlIsBMfgAddrOpHrBMfgCu = false.
end.

/* ============================================================================= *
 * BMfgAddressList                                                               *
 * ============================================================================= */
if viBMfgAddressListDetailID <> ? and
   viBMfgAddressListDetailID <> 0 and
   vlIsBMfgAddrLstStHrBMfgCu
then do:
    if valid-handle(vhBMfgAddressListDetailInst)
    then do:
        <I-16 {bFcCloseAndStopInstance
             &CLASS           = "BMfgAddressListDetail"}>
    end.
    else do:
        <I-63 {bFcStopInstance
             &CLASS           = "BMfgAddressListDetail"}> 
    end.

    assign viBMfgAddressListDetailID  = 0
           vlIsBMfgAddrLstStHrBMfgCu = false
           vlIsBMfgAddrLstOpHrBMfgCu = false.
end.

/* ============================================================================= *
 * BProfile                                                                      *
 * ============================================================================= */
if vlshouldInstanceBeStopped EQ false
    then do:
        if viBProfile7ID ne 0
        then do:
            <I-3 {bFcStopInstance
            &CLASS           = "BProfile"}>
            assign viBProfile7ID = 0.
        end.
end.

<ANCESTOR-CODE>