CREATE OR REPLACE TRIGGER SVFinBasesBriefBeforeIUD INSTEAD OF INSERT or UPDATE or DELETE
on SVFinBasesBrief
for each row
begin
if deleting
then
DocumentsROEO.SetFinLink(:old.DocType, :old.ID, :old.BaseDocType, :old.BaseID, null);
else
DocumentsROEO.SetFinLink(:new.DocType, :new.ID, :new.BaseDocType, :new.BaseID, :new.LinkSum);
end if;
end;
/