dbo.TSB_TUBaseTreeHasTSBAccountDef
SQL_TRIGGER parent BaseTreeHasTSBAccountDef
Created 2025-06-27T18:01:21.163 · modified 2026-04-14T23:23:07.997 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| BaseTree | OBJECT_OR_COLUMN | ||
| BaseTreeHasTSBAccountDef | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| HelperPersonOrg | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| PersoninBaseTree | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YSingleGUID | TYPE | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIXOriginChanged_Effect | OBJECT_OR_COLUMN | |
| dbo | QER_FCVXOriginToInheritInfo | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create trigger TSB_TUBaseTreeHasTSBAccountDef on BaseTreeHasTSBAccountDef for Update not for Replication as begin BEGIN TRY if exists (select 2 top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = 3dbo.QBM_FGISessionContext('') if update(XOrigin) or update(XIsInEffect) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 4 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct a.UID_Org as uid from BaseTreeHasTSBAccountDef a join deleted d on 5 a.XObjectKey = d.XObjectKey where ( dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 or dbo.QER_FCVXOriginToInheritInfo 6(d.XOrigin) <> dbo.QER_FCVXOriginToInheritInfo(a.XOrigin) ) ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-BaseTreeHasObject', @DBQueueElements_01 declare 7@ChangedOrg QBM_YSingleGUID insert into @ChangedOrg (UID_SingleGuid) select distinct d.UID_Org as uid from BaseTreeHasTSBAccountDef a join deleted d on 8 a.XObjectKey = d.XObjectKey where dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin, a.XOrigin, d.XIsInEffect, a.XIsInEffect) = 1 if @@ROWCOUNT > 0 begin declare 9 @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, 'TSB-K-OrgHasTSBAccountDef', @GenProcID 10 from ( select c.UID_SingleGuid as uid from @ChangedOrg c ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-AllChildrenOfOrg', @DBQueueElements_02 declare @DBQueueElements_03 11 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select b.UID_Org as uid from @ChangedOrg 12 c join BaseTree b on c.UID_SingleGuid = b.UID_Org where b.ITShopInfo = 'BO' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgAutoChild', @DBQueueElements_03 13 declare @DBQueueElements_04 QBM_YDBQueueRaw insert into @DBQueueElements_04 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select 14 pio.UID_Person as uid from @ChangedOrg c join PersoninBaseTree pio on c.UID_SingleGuid = pio.UID_Org and pio.XOrigin > 0 union select hpo.UID_Person as 15 uid from @ChangedOrg c join HelperPersonOrg hpo on c.UID_SingleGuid = hpo.UID_Org ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-PERSONHASTSBAccountDef', 16@DBQueueElements_04 end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 17
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:23:07.997
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, BaseTreeHasTSBAccountDef, BaseTree, PersoninBaseTree…
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
TSB-K-BaseTreeHasObject TSB-K-OrgHasTSBAccountDef QER-K-AllChildrenOfOrg QER-K-OrgAutoChild TSB-K-PERSONHASTSBAccountDefTemp tables / referenced variables
Temp: None extracted.
Variables: @GenProcID @DBQueueElements_01 @ChangedOrg @ROWCOUNT @DBQueueElements_02 @DBQueueElements_03 @DBQueueElements_04
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.