project BLF > class Database Component > method AdditionalUpdates

Description

This method is part of the SetPublicTables flow.
When executed, data in the input class tables (prefix t_s) is validated and found correct, and copied into the class tables (prefix t_o).
This method can be extended to do updates that do not require a validation or that involve running business methods of other business classes. These classes should be started with ADD-TO-TRANSACTION = 'true'. Also make sure to add these classes in method StopExternalInstances.


Parameters


oiReturnStatusoutputinteger


Internal usage


BLF
method database.MaintainByDatasetWithOutput
method BBaseDaemon.ApiValidateStatus
method BBaseDaemon.ControlDaemon
method BBaseDaemonQueue.ApiResetDaemonQueueStatus
method BBaseDaemonQueue.LockWorkItem
method BBaseDaemonQueue.SetWorkResult
method BBusinessComponent.ApiSynchronise
method BBusinessComponent.ApiSynchroniseDefaultActivities
method BCompany.ApiSynchronise
method BCompany.SynchronizeSharedSet
method BControlProperty.ApiSaveViewSettings
method BControlProperty.DeleteControlProperty
method BControlProperty.RemoveCustomFieldFromUI
method BControlProperty.SaveControlProperties
method BDocumentLink.SaveDocumentList
method BDocumentLink.StoreDocument
method BDocumentLink.ValidateBCAndAdditionalUpdates
method BDomain.SetDomainTypeAsSystem
method BDomain.SetPrimaryCompany
method BDomain.SynchronizeSharedSet
method BEventDaemon.ApiUpdate
method BEventDaemonQueue.CreateEventFinish
method BFcSession.CreateFcSessionRecord
method BFcSession.UpdateFcSessionRecord
method BLanguage.ApiSynchronise
method BObjectSecurity.DataSaveObjectSecurity
method BPrinter.apiRefreshInfo
method BReportDaemon.UpdateSocketInformation
method BReportSchedule.ValidateBCAndAdditionalUpdates
method BReportTranslation.apiSynchronise
method BReportVariant.SetReportCBF
method BResource.ApiLinkResource
method BResource.ApiSetResourceCategories
method BResource.ApiSynchronize
method BResource.CreateResource
method BRole.ApiSynchronise
method BRole.CreateRolResource
method BRole.SaveRolePermissionsData
method BScanDaemon.ApiUpdateDaemonConfiguration
method BScanDaemonQueue.CreateScanDaemonQueue
method BSetting.ApiUpdateSetting
method BSetting.CreateSystemSettings
method BSettingConfiguration.apiSynchronise
method BSharedSet.ApiSynchronise
method BSharedSetType.ApiSynchronise
method BSODCategory.ApiCreateCategories
method BSODCategoryExclusion.ApiSetMatrixData
method BSODViolationRule1.CheckRule1
method BSODViolationRule1.DeleteFinish
method BSODViolationRule2.CheckRule2
method BSODViolationRule2.DeleteFinish
method BStoredSearch.apiSaveStoredSearch
method BStoredSearch.ValidateBCAndAdditionalUpdates
method BSystem.ActivateSOD
method BTimeOutDaemonQueue.CreateTimeOutDaemonQueue
method BTranslation.ApiSetTranslation
method BTranslation.SetTranslations
method BUser.ApiSaveUserDomainEntityAccess
method BUser.ApiSynchronise
method BUser.LinkCompanyToDaemonUsers
method BUserRole.ApiSaveUserMembership
method BUserRole.ApiSynchronise
method BUserRole.UpdateUsrRoleFromUserMnt
method BWorkClass.ApiUpdate
method BWorkObject.CreateOrUpdateWorkObject
method BWorkObject.DeleteWorkObjectScopeHolders
method BWorkObject.UpdateWorkobjectStatus
method BXmlDaemon.ApiUpdate
method BXmlDaemonQueue.CreateDaemonQueue
method BRole.ApiMaintainRolesForModuleURI
method BFcTranslation.ApiSaveFcTranslation

QadFinancials
method BAccountingInterface.ApiSynchronise
method BAcctIFFilters.ApiUpdateAcctIFFilter
method BAddressType.ApiStdMaintainTT
method BAddressType.ApiSynchronise
method BAllocationBatch.ValidateBCAndAdditionalUpdates
method BAPMatching.ValidateBCAndAdditionalUpdates
method BBalanceDaemonQueue.CreateBalanceDaemonQueue
method BBankAccountFormat.ApiSynchronise
method BBankEntry.ApiCreateBankEntryFromImport
method BBankEntry.ApiStdMaintainTT
method BBankEntry.ValidateBCAndAdditionalUpdates
method BBankFileFormat.ApiMaintainStdTT
method BBankImport.ApiEDIImportBankImport
method BBankImport.ApiImportUSBank
method BBankImportLine.ValidateBCAndAdditionalUpdates
method BBankNumber.ApiStdMaintainTT
method BBankNumber.UpdateBankNumber
method BBankNumber.UpdateBankNumberAndPayCode
method BBankNumber.ValidateBCAndAdditionalUpdates
method BBankPayFormat.ApiMaintainStdTT
method BBankPayFormat.UpdateBankPayFormatNbr
method BBill.ChangeBillStatus
method BBill.ConfirmPrint
method BBill.CreateBills
method BBLWICountry.ApiStdMaintainTT
method BBudget.ApiCopyBudget
method BBudgetDaemonQueue.CreateBudgetDaemonQueue
method BBudgetLink.ApiCreateOrUpdateBudgetLink
method BBudgetLink.DeleteBudgetLinkByBudgetID
method BBudgetLinkAcc.ApiCreateOrUpdateBudgetLinkAcc
method BBudgetLinkAccDet.ApiCreateOrUpdateBudgetLinkAccDet
method BBudgetLinkActual.ApiCreateBudgetLinkActual
method BBudgetLinkActual.ApiUpdateBudgetLinkActualRep
method BBudgetLinkActual.DeleteBudgetLinkActualByBudgetID
method BBudgetLinkCommitment.ApiCreateBudgetLinkCommit
method BBudgetLinkCommitment.DeleteBudgetLinkCommitByBudgetID
method BBusinessRelation.ApiMaintainAddressForEI
method BBusinessRelation.ApiStdMaintainTT
method BBusinessRelation.ApiSynchronise
method BBusinessRelation.ValidateBCAndAdditionalUpdates
method BCCollection.ValidateBCAndAdditionalUpdates
method BCDocument.ApiSetCDocumentStatusChange
method BCDocument.ApiUpdateCDocumentPrint
method BCDocument.CreateVoidedDocument
method BCDocument.ValidateBCAndAdditionalUpdates
method BCDocumentStatus.CreateDocumentStatusForBankGL
method BCInvoice.ApiCreateCreditorInvoices
method BCInvoice.ApiStdMaintainTTWithExtPost
method BCInvoice.ApiStdMaintainTTWithIntPost
method BCInvoice.ApiUpdateCInvoiceFromAPM
method BCInvoice.ValidateBCAndAdditionalUpdates
method BCompany.ApiStdMaintainTT
method BCompany.ValidateBCAndAdditionalUpdates
method BCompanyProperty.UpdateCompanyProperty
method BCompanyProperty.ValidateBCAndAdditionalUpdates
method BConCheck.ValidateBCAndAdditionalUpdates
method BConsolid.CreateConsolidation
method BConsolidPeriodXref.ApiSetConsolidPeriods
method BCostCentre.ApiStdMaintainTT
method BCountry.ApiStdMaintainTT
method BCountry.ApiSynchronise
method BCounty.ApiStdMaintainTT
method BCPay.ApiCreateCPay
method BCPay.ApiCreateCPayRecords
method BCPay.ValidateBCAndAdditionalUpdates
method BCreditor.ApiStdMaintainTTV01
method BCreditorBalance.RebuildHistory
method BCreditorBalance.UpdateCBalanceAndCHist
method BCrossCyDaemonQueue.CreateCrossCyDaemonQueue
method BCubeDaemonQueue.CreateFRWCubeDaemonQueue
method BCurrency.ApiStdMaintainTT
method BCurrency.ApiSynchronise
method BDCollection.ValidateBCAndAdditionalUpdates
method BDDocument.ApiSetDDocumentStatusChange
method BDDocument.ValidateBCAndAdditionalUpdates
method BDebtor.ApiCheckCreditLimit
method BDebtor.ApiStdMaintainTT
method BDebtor.ApiUpdateDebtorHighCreditInfo
method BDebtor.ApiUpdateDebtorPaymentSales
method BDebtorBalance.RebuildHistory
method BDebtorBalance.UpdateDBalanceAndDHist
method BDebtorEndUser.ApiCreateDebtorEndUser
method BDebtorEndUser.ApiDeleteEndUserForDebtor
method BDebtorEndUser.ApiStdMaintainTT
method BDebtorShipTo.ApiCreateDebtorShipto
method BDebtorShipTo.ApiDeleteShiptoForDebtor
method BDebtorShipTo.ApiMaintainDebtorShipto
method BDInvoice.ApiCreateDebtorInvoicesV01
method BDInvoice.ApiCreateDInvoicesFinCharge
method BDInvoice.ApiSetDeductionStatus
method BDInvoice.ApiStdMaintainTTWithExtPost
method BDInvoice.ApiStdMaintainTTWithIntPost
method BDInvoice.ApiUpdateDInvoiceOpInfo
method BDInvoice.UpdateDeductionDetail
method BDInvoice.ValidateBCAndAdditionalUpdates
method BDivision.ApiStdMaintainTT
method BDomain.ApiSynchronise
method BDomain.ValidateBCAdditionalUpdates
method BDomainProperty.UpdateDomainProperty
method BDPay.ApiCreateDPay
method BDPay.ApiCreateDPayRecords
method BDPaymentSelection.DeleteDPaySelLine
method BDPaymentSelection.StoreBankReference
method BDPaymentSelection.UpdateDPaySelAndPayCode
method BERS.ValidateBCAndAdditionalUpdate
method BERSLine.ValidateBCAndAdditionalUpdates
method BExchangeRate.ApiSaveDerivedExchangeRates
method BExchangeRate.ApiStdMaintainTT
method BExchangeRateType.ApiSynchronise
method BExchangeRateType.UpdateExchangeRateType
method BExpenseGLMatrix.ApiSetExpenseGLMatrix
method BExpenseNote.ValidateBCAndAdditionalUpdates
method BFixedAssetAsset.ApiStdMaintainTT
method BFixedAssetAsset.ValidateBCAndAdditionalUpdates
method BFixedAssetCapital.ApiCreateFACapital
method BFixedAssetCapital.ApiStdMaintainStatus
method BFRWAnalysisCode.UpdateFRWAnCode
method BFRWTreeView.UpdateFRWTreeNodeId
method BGL.ApiStdMaintainTT
method BGLMask.ApiGetGLMasks
method BGLMask.ApiSetGLMasks
method BGLMask.ApiStdMaintainTT
method BGLOpenItem.ValidateBCAddUpdDataSave
method BGLOpenItem.ValidateBCAndAdditionalUpdates
method BGLSystemType.ApiSynchronise
method BGLSystemType.SynchronizeGLSystemType
method BGLType.ApiSynchronise
method BHistoryDaemonQueue.CreateHistoryDaemonQueue
method BHoliday.UpdateHolidayByInput
method BJournal.ApiGenerateInitialJournals
method BJournal.ApiStdMaintainTT
method BPosting.ApiMassDeletePeriodicCostingPostings
method BPosting.ApiMassDeletePeriodicCostingPostingsByDomain
method BPosting.ApiMassReversePeriodicCostingPostings
method BPosting.ApiMassReversePeriodicCostingPostingsByDomain
method BPosting.ApiStdMaintainMultiTT
method BPosting.ApiStdMaintainTT
method BJournalEntry.ApiUpdateJournal
method BJournalEntry.CreateRecEntryPosting
method BJournalEntry.ValidateBCAddUpdDataSave
method BJournalEntry.ValidateBCAndAdditionalUpdates
method BJournalType.ApiSynchronise
method BLayer.ApiGenerateInitialLayers
method BLayer.ApiStdMaintainTT
method MfgDatabaseComponent.ProcessMaintainDataSave
method BMfgAccount.ApiReplicateFromFinancials
method BMfgAccount.DeleteRoleFromCanRun
method BMfgAccountPayableCtrl.ValidateBCAdditionalUpdates
method BMfgAddress.ApiReplicateFromFinancialsBusRel
method BMfgAddress.ApiReplicateFromFinancialsCreditor
method BMfgAddress.ApiReplicateFromFinancialsDebtor
method BMfgAddress.ApiReplicateFromFinancialsEndUSer
method BMfgAddress.ApiReplicateFromFinancialsShipTo
method BMfgAddress.DeleteDockAddressesForCustomer
method BMfgAddressListDetail.ApiReplicateFromFinancialsCreditor
method BMfgAddressListDetail.ApiReplicateFromFinancialsDebtor
method BMfgAddressListDetail.ApiReplicateFromFinancialsEndUser
method BMfgAddressListDetail.ApiReplicateFromFinancialsShipTo
method BMfgBatchControlDetail.ValidateBCAndAdditionalUpdates
method BMfgBatchNumber.ValidateBCAdditionalUpdates
method BMfgControlWorkTable.DeleteRoleFromCanRun
method BMfgCostCenter.ApiReplicateFromFinancials
method BMfgCreditTerms.ApiReplicateFromFinancials
method BMfgCustomer.ApiReplicateFromFinancials
method BMfgCustomer.UpdateCustomerLanguageSearchName
method BMfgDataEntryProfile.DeleteRoleFromCanRun
method BMfgDaybook.ApiReplicateFromFinancials
method BMfgEmployee.ApiReplicateFromFinancials
method BMfgEndUser.ApiReplicateFromFinancials
method BMfgEndUser.MaintainDataBusinessRelation
method BMfgEntity.ApiReplicateFromFinancials
method BMfgEntity.ValidateBCAndAdditionalUpdates
method BMfgExchangeRate.ApiReplicateFromFinancials
method BMfgInventoryMovSite.DeleteRoleFromCanRun
method BMfgLocation.ValidateBCAndAdditonalUpdates
method BMfgLocationDet.ValidateBCAndAdditionalUpdates
method BMfgMenu.DeleteMenuFromResource
method BMfgNRM.ApiReplicateFromFinancials
method BMfgPendingVoucher.ValidateBCAndAdditionalUpdates
method BMfgProject.ApiReplicateFromFinancials
method BMfgSite.DeleteRoleFromCanRun
method BMfgSubAccount.ApiReplicateFromFinancials
method BMfgSupplier.ApiReplicateFromFinancials
method BMfgSupplier.UpdateSupplierLanguageSearchName
method BMfgSystemAccountControl.UpdateRndMthd
method BOpenItemAdjustment.OIAdjCommitSubOpenItemAdj
method BPaymentCondition.ApiStdMaintainTT
method BPaymentFormat.ApiImportPaymentFormat
method BPaymentFormat.ApiStdMaintainTT
method BPaymentFormat.ApiSynchronise
method BPaymentSelection.APITransferPayments
method BPaymentSelection.ChangeStatusPaymentSelection
method BPaymentSelection.ChangeStatusPaymentSelInBatch
method BPeriod.ApiActivatePeriodForPeriodicCosting
method BPeriod.ApiCreatePeriod
method BPeriod.ApiDeactivatePeriodForPeriodicCosting
method BPeriod.ApiStdMaintainTT
method BPeriod.ApiUpdatePeriodStatus
method BPeriod.LoadAndUpdateInstanceData
method BPeriod.SynchronizePeriod
method BPeriod.ValidateBCAndAdditionalUpdates
method BPeriodMark.CreateDefaultForNewCompany
method BPeriodMark.ValidateBCAndAdditionalUpdates
method BPostingHist.UpdatePostingHist
method BPostingSafHist.ValidateBCAndAdditionalUpdates
method BPostingTemplate.ValidateBCAndAdditionalUpdates
method BPrepayment.UpdatePaySelPrepay
method BProfile.ApiStdMaintainTT
method BProfile.ValidateBCAdditionalUpdates
method BProfileType.ApiSynchronise
method BProject.ApiStdMaintainTT
method BProjectGroup.ApiStdMaintainTT
method BProjectStatus.ApiStdMaintainTT
method BQBudgetActual.ApiCreateQBudgetLinkActual
method BQBudgetActual.ApiDeleteQBudgetLinkActual
method BQBudgetCommitment.ApiCreateQBudgetLinkCommit
method BQBudgetCommitment.ApiDeleteQBudgetLinkCommit
method BQCInvoiceMovement.ApiCreateQCInvoiceMovement
method BQCInvoiceMovement.ApiProcessQCInvoiceMovement
method BQCrossCyPosting.ApiCreateQCrossCyPosting
method BQCrossCyPosting.ApiProcessQCrossCyPosting
method BQCrossCyPosting.ValidateBcAndAdditionalUpdates
method BQDInvoiceMovement.ApiCreateQDInvoiceMovement
method BQDInvoiceMovement.ApiProcessQDInvoiceMovement
method BQFRWCube.ApiCreateQFRWCubeAndSaf
method BQFRWCube.ApiDeleteQFRWCube
method BQPosting.ApiCreateQPostingLineSaf
method BQPosting.ApiProcessQPostingLineSaf
method BRecurringEntry.ApiPostRecEntryCommit
method BReplicaDaemonQueue.ApiCreateReplicationDaemonQueue
method BRevaluation.LoadAndUpdateInstanceData
method BRevaluation.RevaluationPost
method BRevaluationSaf.ValidateBCAndAdditionalUpdates
method BRole.AddGenCodeGroupToRoles
method BRole.ApiCreateCIApproveRole
method BRoundingMethod.ApiSynchronise
method BSaf.ApiStdMaintainTT
method BSafConcept.ApiStdMaintainTT
method BSafConcept.ApiSynchronise
method BSafStructure.ApiStdMaintainTT
method BSafStructureLink.ApiStdMaintainTT
method BSafStructureLink.UpdateSafStructureLink
method BSharedSetMergeLog.LogEndMerge
method BSharedSetMergeLog.LogStartMerge
method BState.ApiStdMaintainTT
method BSystem.ApiSetSystemPropertiesExtInvCert
method BSystemProperty.SetSystemProperties
method BSystemProperty.SetSystemPropertiesExtInvCert
method BSystemProperty.SynchronisePropertyInvCert
method BTaxRegister.UpdateTaxRegisterFinalPrint
method BUserRole.CreateUsrRoleFromRoleCIApproveRole
method BVAT.ApiDeleteOfTaxRate
method BVAT.ApiStdMaintainTT
method BVATGroup.ApiStdMaintainTT
method BVATGroup.ApiSynchronise
method BVATPeriod.APIUpdateVATPeriodStatus
method BWithholdingTax.ValidateBCAndAdditionalUpdates
method BYearClosing.ApiStdMaintainTT
method BAcctIFFilters.ApiSynchronise
method BAccountingInterface.ApiUpdateAcctIF
method BBankImportLine.UpdateBankImportLineStatusAndLog
method BBudget.UpdateBudgetCompanyFromChart
method BCOACrossRef.UpdateCOACrossRef

QadFitnesse
method BBankEntry.ApiBankingEntryCreate
method BCompanyProperty.ApiCompanyUpdate
method BCompanyProperty.ApiUpdateARAPTaxDateProperties
method BDPaymentSelection.ApiDPaymentSelectionCreate
method BPaymentSelection.ApiPaymentSelectionCreate


program code (program1/database.p)

/* ================================================================= */
/* Clear events from previous call of SetPublicTables                */
/* ================================================================= */
assign vcExternalControlItems = "".

if viBEventDaemonQueueID = 0
then vlEventsPublished = no.
else do:
    <I-12 {bFcOpenInstance
            &CLASS           = "BEventDaemonQueue"}>
    <M-15 run ClearData (output viFcReturnSuper (oiReturnStatus)) in BEventDaemonQueue>
    vlEventsPublished = yes.
end.

<I-1 {bFcRun
            &PARAMETERS = "output viFcReturnSuper"
            &PROCEDURE  = "gipr_ObjectStatusUpdate"}>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

<M-3 run UpdateLastModified (output viFcReturnSuper (oiReturnStatus)) in database>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

/* ================================================================= */
/* Publish all events that have not already been published           */
/* (by object status change)                                         */
/* ================================================================= */
if vlEventPublishingActive
then do:
    /* First time in additional updated vlEventPublishingNeeded = ?
     * So run this query only once in every instance of a database component
     */
    If vlEventPublishingNeeded = ? 
    Then Do:
        <Q-16 assign vlFcQueryRecordsAvailable = LookupDestinations (NoCache)
          (input viCompanyId, (CompanyId)
           input vcFcComponentName, (BusComponentName)
           input yes, (AllChanges)) in BEventConfig >
        /* set the vlEventPublishingNeeded to true or false
         * so next time this query read will be skipped
         */                                                           
        If vlFcQueryRecordsAvailable <> False
        Then Assign vlEventPublishingNeeded = True.
        Else Assign vlEventPublishingNeeded = False.
    End.
    if vlEventPublishingNeeded = True
    then do:
        <M-22 run EventPublishing
           (input  false (ilForcePublish), 
            output viFcReturnSuper (oiReturnStatus)) in database>
        if viFcReturnSuper <> 0
        then oiReturnStatus = viFcReturnSuper.
        if viFcReturnSuper < 0
        then return.
    end.
end.

if vlEventsPublished
then do:
    vlEventsPublished = no.
    <M-37 run CreateEventFinish  (output viFcReturnSuper (oiReturnStatus)) in BEventDaemonQueue>
    /* ========================================================================================================= */
    /* Normally we would here close BEventDaemonQueue but we will not do it for performance                      */
    /* reasons as this way the Commit of the transaction does not have to re-open the instance to commit it.     */
    /* And in all other scenario's the instance of the class ill be closed by the de-activiate procedure of the  */
    /* appserver that is executed after each call to the appserver                                               */
    /* ========================================================================================================= */
    if viFcReturnSuper <> 0
    then oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.
end.

/* ================================================================= */
/* If current object is active in workflow, check if an instance of  */
/* BWorkObject is part of this transaction.                          */

/* (That is when the end-user opened and saved the workflow window.) */
/* If this is not the case, workflow update must be done here.       */
/* ================================================================= */
if  vlWorkFlowActive
and vcFcComponentName <> "BWorkObject":U
then do:
    <M-23 run UpdateWorkobject (output viFcReturnSuper (oiReturnStatus)) in database>
    if viFcReturnSuper <> 0
    then oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.
end.

/* ================================================================= */
/* Save translations.                                                */
/* ================================================================= */
if vcFcComponentName <> "BTranslation"
and can-find (first tTransString)
then do:
    <I-63 {bFcAddToTransaction
         &CLASS           = "BTranslation"}>
    <M-54 run SetTranslations
       (input  tTransString (t_sTransString), 
        output viFcReturnSuper (oiReturnStatus)) in BTranslation>
    /* ========================================================================================================= */
    /* Normally we would here close BTranslation but we will not do it for performance                           */
    /* reasons as this way the Commit of the transaction does not have to re-open the instance to commit it.     */
    /* And in all other scenario's the instance of the class ill be closed by the de-activiate procedure of the  */
    /* appserver that is executed after each call to the appserver                                               */
    /* ========================================================================================================= */
    if viFcReturnSuper <> 0
    then oiReturnStatus = viFcReturnSuper.
    if viFcReturnSuper < 0
    then return.
end.

finally:

    if vlEventsPublished
    then.   /* ========================================================================================================= */
            /* Normally we would here close BEventDaemonQueue but we will not do it for performance                      */
            /* reasons as this way the Commit of the transaction does not have to re-open the instance to commit it.     */
            /* And in all other scenario's the instance of the class ill be closed by the de-activiate procedure of the  */
            /* appserver that is executed after each call to the appserver                                               */
            /* ========================================================================================================= */
    
    for each tXMLTables:
        if tXMLTables.tlStatic
        then delete object tXMLTables.thBuffer no-error.
        else delete object tXMLTables.thTableHandle no-error.
        delete tXMLTables.
    end.
    
end finally.