dbo.CPL_TUPerson
SQL_TRIGGER parent Person
Created 2025-06-27T18:01:18.157 · 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 |
|---|---|---|---|
| ComplianceRule | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| person | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YParameterList | TYPE | ||
| QER_PITShopHelperFillAll | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIBitPatternXMarkedForDel | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIColumnUpdatedOthers | 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.
1create trigger CPL_TUPerson on Person for Update not for Replication as begin declare @Parameter nvarchar(1000) declare @QBM_BitPatternXMarkedForDel_Delay 2 int = dbo.QBM_FGIBitPatternXMarkedForDel('|Delay|', 0) BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted 3) goto start return start: declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext('') declare @ValidRules QBM_YParameterList if dbo.QBM_FGIColumnUpdatedOthers 4 ('Person', 'XTouched', columns_updated()) = 1 and (dbo.QBM_FGIColumnUpdatedOthers ('Person', 'XMarkedForDeletion', columns_updated()) = 1 or exists (select 5 top 1 1 from deleted i join person p on i.uid_person = p.uid_person where sign(i.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Delay) <> sign(p.XMarkedForDeletion 6 & @QBM_BitPatternXMarkedForDel_Delay) ) ) begin if '1' = dbo.QBM_FGIConfigparmValue('QER\ComplianceCheck\CalculateImmediately') begin insert into @ValidRules 7 (Parameter1) select r.UID_ComplianceRule from ComplianceRule r where r.IsInactive = 0 and r.IsWorkingCopy = 0 and ( r.IsPersonStoreInverted = 0 or (r.IsPersonStoreInverted 8 = 1 and N'1=1' <> replace(trim(isnull(r.WhereClausePerson, N'1=1')) , N' ' , N'') ) ) declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 9 (object, subobject, genprocid) select x.uid, x.UID_Person, @GenProcID from ( select c.Parameter1 as uid, i.UID_Person from inserted i , @ValidRules c 10) as x exec QBM_PDBQueueInsert_Bulk 'CPL-K-ComplianceSubRuleFillPersonS', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 11 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select m.uid_person as uid from deleted m ) as x exec QBM_PDBQueueInsert_Bulk 12 'CPL-K-ComplianceCheckForPerson', @DBQueueElements_02 end end if update(uid_department) or update(uid_ProfitCenter) or update(uid_Locality) begin select 13 @Parameter = '|' + 'CPL-PWODecisionRule-OC|' + 'CPL-PWODecisionRule-OH|' exec QER_PITShopHelperFillAll @Parameter, @GenProcID end END TRY BEGIN CATCH 14 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 15
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
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QER_PITShopHelperFillAll, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, person, ComplianceRule; uses config QER\ComplianceCheck\CalculateImmediately
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notRead/join references
SQL dependency metadata
Config/session
Config: QER\ComplianceCheck\CalculateImmediately
Session: None extracted.
DBQueue/tasks
CPL-K-ComplianceSubRuleFillPersonS CPL-K-ComplianceCheckForPersonTemp tables / referenced variables
Temp: None extracted.
Variables: @Parameter @QBM_BitPatternXMarkedForDel_Delay @GenProcID @ValidRules @DBQueueElements_01 @DBQueueElements_02
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.