dbo.ATT_TUPerson
SQL_TRIGGER parent Person
Created 2025-06-27T18:01:12.213 · modified 2026-04-14T23:23:08.430 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AttestationCase | OBJECT_OR_COLUMN | ||
| AttestationHelper | OBJECT_OR_COLUMN | ||
| AttestationHistory | OBJECT_OR_COLUMN | ||
| BaseTree | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| Person | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Single | OBJECT_OR_COLUMN | ||
| QBM_PJobCreate_HOUpdate_L | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YParameterList | TYPE | ||
| QER_PITShopHelperFill_Recalc | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVElementToObjectKey1 | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVStringTrimLDSPrefix | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create trigger ATT_TUPerson on Person for Update not for Replication as begin declare @Elements QBM_YParameterList declare @XUser nvarchar 2(64) = object_name(@@procid) declare @Xdate datetime = getutcdate() BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 3 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext('') if UPDATE(UID_Department) begin declare @RecalcParameter_01 4 QBM_YCursorBuffer insert into @RecalcParameter_01 (ObjectKey1, UID1, Ident1) select dep.XObjectKey , 'ATT-PWODecisionRule-DM', 'A' from inserted i join 5 BaseTree dep on i.UID_Department = dep.UID_Org union all select dep.XObjectKey , 'ATT-PWODecisionRule-DM', 'A' from deleted d join BaseTree dep on d.UID_Department 6 = dep.UID_Org union all select i.XObjectKey, 'ATT-PWODecisionRule-ED', 'A' from inserted i union all select i.XObjectKey, 'ATT-PWODecisionRule-AD', 'A' 7 from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end if UPDATE(UID_Locality) begin declare @RecalcParameter_02 QBM_YCursorBuffer 8 insert into @RecalcParameter_02 (ObjectKey1, UID1, Ident1) select i.XObjectKey, 'ATT-PWODecisionRule-LM', 'A' from inserted i union all select i.XObjectKey 9, 'ATT-PWODecisionRule-AL', 'A' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_02, @GenprocID end if UPDATE(UID_Profitcenter) begin 10 declare @RecalcParameter_03 QBM_YCursorBuffer insert into @RecalcParameter_03 (ObjectKey1, UID1, Ident1) select i.XObjectKey, 'ATT-PWODecisionRule-PM' 11, 'A' from inserted i union all select i.XObjectKey, 'ATT-PWODecisionRule-AP', 'A' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_03 12, @GenprocID end if update(UID_PersonMasterIdentity) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'ATT-K-AttestationHelper-Cfg', 13'', @GenProcID end if update(IsInActive) begin if dbo.QBM_FGIConfigparmValue('QER\Attestation\AutoCloseInactivePerson') > ' ' begin insert into @Elements 14(Parameter1, Parameter3) select distinct ac.XObjectKey, ac.UID_AttestationCase from Person p join deleted d on p.UID_Person = d.UID_Person and p.IsInActive 15 = 1 and d.IsInActive = 0 join AttestationCase ac on p.XObjectKey in (ac.ObjectKey1, ac.ObjectKeyBase , ac.ObjectKey2 , ac.ObjectKey3 ) where ac.IsClosed 16 = 0 exec QBM_PJobCreate_HOUpdate_L 'AttestationCase', @elements, @GenProcID , DEFAULT , @p1 = 'IsClosed' , @v1 = '1' update AttestationCase set ReasonHead 17 = '#LDS#Automatic system approval: Case closed due to identity becoming inactive.|' , DateHead = @Xdate , XDateUpdated = @Xdate , XUserUpdated = @XUser 18 from AttestationCase ac join @Elements e on ac.XObjectKey = e.Parameter1 update @Elements set Parameter2 = NEWID() insert into AttestationHistory (DecisionType 19, IsDecisionBySystem, UID_AttestationHistory, UID_PersonHead, UID_AttestationCase, DisplayPersonHead, ReasonHead, DateHead, XDateInserted, XDateUpdated 20, XUserInserted, XUserUpdated, DecisionLevel, XTouched, XObjectKey) select 'Abort', 1, e.Parameter2 as UID_AttestationHistory, null, e.Parameter3 as UID_AttestationCase 21, dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval.|') , dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval: Case closed due to identity becoming inactive.|' 22), GetUTCDate(), @Xdate, @Xdate, @XUser, @XUser, 0, '', dbo.QBM_FCVElementToObjectKey1('AttestationHistory', 'UID_AttestationHistory', e.Parameter2) from 23 @Elements e end declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID 24 from ( select distinct ph.UID_AttestationCase as uid from deleted d join Person p on d.UID_Person = p.UID_Person join AttestationHelper ph on ph.UID_PersonHead 25 = p.UID_Person where d.IsInActive = 0 and p.IsInActive = 1 ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper', @DBQueueElements_01 end if 26 UPDATE(UID_PersonHead) begin declare @RecalcParameter_04 QBM_YCursorBuffer insert into @RecalcParameter_04 (ObjectKey1, UID1, Ident1) select i.XObjectKey 27, 'ATT-PWODecisionRule-XM', 'A' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_04, @GenprocID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd 28 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 29
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:08.430
creates object-layer jobs via QBM_PJobCreate* inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QER_PITShopHelperFill_Recalc, QBM_PDBQueueInsert_Single, QBM_PJobCreate_HOUpdate_L, QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, INSERT AttestationHistory, UPDATE not, UPDATE AttestationCase; reads/joins inserted, deleted, BaseTree, Person, AttestationCase…; uses config QER\Attestation\AutoCloseInactivePerson
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into INSERT AttestationHistory UPDATE not UPDATE AttestationCaseCalled routines
Read/join references
SQL dependency metadata
- AttestationCase
- AttestationHelper
- AttestationHistory
- BaseTree
- deleted
- inserted
- Person
- QBM_PDBQueueInsert_Bulk
- QBM_PDBQueueInsert_Single
- QBM_PJobCreate_HOUpdate_L
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueRaw
- QBM_YParameterList
- QER_PITShopHelperFill_Recalc
- dbo.QBM_FCVElementToObjectKey1
- dbo.QBM_FCVStringTrimLDSPrefix
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
Config/session
Config: QER\Attestation\AutoCloseInactivePerson
Session: None extracted.
DBQueue/tasks
QBM-K-CommonReCalculate ATT-K-AttestationHelperTemp tables / referenced variables
Temp: #LDS #Automatic
Variables: @Elements @XUser @procid @Xdate @GenProcID @RecalcParameter_01 @GenprocID @RecalcParameter_02 @RecalcParameter_03 @elements @p1 @v1 @DBQueueElements_01 @RecalcParameter_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.