![]() |
---|
create trigger TR_PROSPECT_T2BINSERTUPDATE on dbo.PROSPECT after insert, update not for replication as begin if dbo.UFN_B2T_CONTEXTISSYNC() = 0 begin -- force re-sync of the parent row update dbo.TA_CONSTITUENT set ACTIONCODE = case when ACTIONCODE=1 then 1 else 2 end where ID in(select ID from INSERTED); update dbo.TA_ACCOUNTS set ACTIONCODE = case when ACTIONCODE=1 then 1 else 2 end where ID in(select ID from INSERTED); end end |