TR_INTERACTIONRESPONSE_T2BINSERTUPDATE
Definition
Copy
CREATE trigger TR_INTERACTIONRESPONSE_T2BINSERTUPDATE on dbo.INTERACTIONRESPONSE after insert, update not for replication
as begin
if dbo.UFN_B2T_CONTEXTISSYNC() = 0
-- force re-sync of the parent row
update dbo.TA_INTERACTION
set ACTIONCODE = case when ACTIONCODE=1 then 1 else 2 end
where ID in(select INTERACTIONID from INSERTED)
end