dbo.QER_TUHelperHeadPerson
SQL_TRIGGER parent HelperHeadPerson
Created 2025-06-27T18:01:08.090 · modified 2026-04-14T23:23:08.353 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| Delegation | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| HelperHeadPerson | OBJECT_OR_COLUMN | ||
| Person | OBJECT_OR_COLUMN | ||
| personwantsorg | OBJECT_OR_COLUMN | ||
| QBM_PJobCreate_HOCallMethod | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YSingleGUID | TYPE | ||
| QER_PITShopHelperFill_Recalc | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVStringToBit | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIXOriginChanged_Effect | OBJECT_OR_COLUMN | |
| dbo | QER_FGIGenProcIDForPWO | OBJECT_OR_COLUMN | |
| dbo | QER_FGIPWOStateFinalError | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create trigger QER_TUHelperHeadPerson on HelperHeadPerson for update not for Replication as begin declare @GenProcID varchar(38) declare @GenProcIDToUse 2 varchar(38) declare @CfgUseGenProcID bit = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO')) declare @SQLcmd 3 nvarchar(1000) declare @uid_personwantsorg varchar(38) declare @BasisObjectKey varchar(138) declare @UID_PWOStateFinalError nvarchar(64) declare @ElementBuffer 4 QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int declare @ChangedPersonHead QBM_YSingleGUID BEGIN TRY if exists (select top 1 1 from 5 deleted) goto start return start: select @GenProcID = dbo.QBM_FGISessionContext('') if update(XOrigin) begin insert into @ChangedPersonHead (UID_SingleGuid 6) select distinct d.UID_PersonHead as uid from HelperHeadPerson a join deleted d on a.XObjectKey = d.XObjectKey where dbo.QBM_FGIXOriginChanged_Effect(d.XOrigin 7, a.XOrigin, 1, 1) = 1 if @@ROWCOUNT > 0 begin declare @RecalcParameter QBM_YCursorBuffer insert into @RecalcParameter (UID1, ObjectKey1, Ident1) select 8 'QER-PWODecisionRule-CM', e.XObjectKey, 'I' from (select d.UID_Person from HelperHeadPerson a join deleted d on a.XObjectKey = d.XObjectKey where dbo.QBM_FGIXOriginChanged_Effect 9(d.XOrigin, a.XOrigin, 1, 1) = 1 ) x join Person e on x.UID_Person = e.UID_Person exec QER_PITShopHelperFill_Recalc @RecalcParameter, @GenprocID end 10insert into @ElementBuffer(UID1, ObjectKey1, UID2) select pwo.uid_personwantsorg, pwo.XObjectKey, dbo.QER_FGIGenProcIDForPWO(pwo.GenProcID, @GenProcID, 11 @CfgUseGenProcID) as GenProcID from HelperHeadPerson a join deleted y on a.XObjectKey = y.XObjectKey join Delegation d on d.ObjectKeyDelegated = y.XObjectKey 12 join personwantsorg pwo on d.uid_personwantsorg = pwo.uid_personwantsorg where dbo.QBM_FGIXOriginChanged_Effect(y.XOrigin, a.XOrigin, 1, 1) = 1 and 13 pwo.OrderState in ('Assigned', 'Granted', 'New', 'OrderProduct', 'OrderProlongate', 'OrderUnsubscribe', 'Waiting') select @ElementCount = @@ROWCOUNT select 14 @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @uid_personwantsorg = bu.UID1 , @BasisObjectKey = bu.ObjectKey1 ,@GenProcIDToUse 15 = bu.UID2 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex select @SQLcmd = N'uid_personwantsorg = ''' + rtrim(@uid_personwantsorg) + N'''' 16 select @UID_PWOStateFinalError = dbo.QER_FGIPWOStateFinalError(@UID_PersonWantsOrg) exec QBM_PJobCreate_HOCallMethod @objecttype = 'personwantsorg' , 17@whereclause = @SQLcmd , @save = 1 , @MethodName = 'Abort' , @GenProcID = @GenProcIDToUse , @ObjectKeysAffected = DEFAULT , @param1 = '#LDS#Closing delegation because its source was deleted.|' 18 , @param2 = @UID_PWOStateFinalError , @Retries = 3 , @isToFreezeOnError = 1 , @BasisObjectKey = @BasisObjectKey , @checkForExisting = 1 , @WhereClauseAdditional 19 = ' OrderState in (''Assigned'', ''Granted'', ''New'', ''OrderProduct'', ''OrderProlongate'', ''OrderUnsubscribe'', ''Waiting'')' select @ElementIndex 20 += 1 end delete Delegation from deleted d join HelperHeadPerson i on i.XObjectKey = d.XObjectKey join Delegation dl on d.XObjectKey = dl.ObjectKeyDelegated 21 where i.XOrigin = 0 and d.XOrigin > 0 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return 22 end 23
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.353
creates object-layer jobs via QBM_PJobCreate* calls object-layer method via HOCallMethod uses session context values has TRY/CATCH error handling
Summary: calls QER_PITShopHelperFill_Recalc, QBM_PJobCreate_HOCallMethod, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not, DELETE Delegation; reads/joins deleted, HelperHeadPerson, Person, Delegation, personwantsorg; uses config Common\ProcessState\UseGenProcIDFromPWO
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE not DELETE DelegationRead/join references
SQL dependency metadata
- Delegation
- deleted
- HelperHeadPerson
- Person
- personwantsorg
- QBM_PJobCreate_HOCallMethod
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YSingleGUID
- QER_PITShopHelperFill_Recalc
- dbo.QBM_FCVStringToBit
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
- dbo.QBM_FGIXOriginChanged_Effect
- dbo.QER_FGIGenProcIDForPWO
- dbo.QER_FGIPWOStateFinalError
Config/session
Config: Common\ProcessState\UseGenProcIDFromPWO
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: #LDS #Closing
Variables: @GenProcID @GenProcIDToUse @CfgUseGenProcID @SQLcmd @uid_personwantsorg @BasisObjectKey @UID_PWOStateFinalError @ElementBuffer @ElementCount @ElementIndex @ChangedPersonHead @ROWCOUNT @RecalcParameter @GenprocID @UID_PersonWantsOrg @objecttype @whereclause @save @MethodName @ObjectKeysAffected @param1 @param2 @Retries @isToFreezeOnError @checkForExisting @WhereClauseAdditional
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.