TR_PROSPECTPLAN_T2BUPDATE
Definition
Copy
CREATE trigger TR_PROSPECTPLAN_T2BUPDATE on dbo.PROSPECTPLAN after update not for replication
as begin
-- intentionally leaving off UFN_B2T_CONTEXTISSYNC condition, even updates from sync need to trigger update
-- force re-sync of any opportunities
update dbo.TA_OPPORTUNITY
set ACTIONCODE = case when ACTIONCODE=1 then 1 else 2 end
where ID in(select o.ID
from dbo.OPPORTUNITY o, INSERTED i
where o.PROSPECTPLANID = i.ID)
end