This trigger on the DELETES table seems to work.
CREATE OR REPLACE TRIGGER D202574_custom
BEFORE INSERT ON D202574
FOR EACH ROW
SELECT COUNT(1) INTO v_upd_row
WHERE objectid = :new.sde_deletes_row_id
AND sde_state_id = :new.deleted_at;
IF v_upd_row = 0 THEN
raise_application_error(-20001, 'Deleting has been disabled via a custom trigger.');
For bonus points, I only prevented deletes if the record was created before a certain date (last Monday at 12:00 AM).
I did this because my data is synced to an external system on weekends. I want to prevent users from deleting records that have already been synced to the external system.
create or replace trigger v202577_delete_custom
for each row
objectid = :new.sde_deletes_row_id
and sde_state_id = :new.deleted_at;
a.objectid = :new.sde_deletes_row_id
and a.created_date < trunc(next_day (sysdate - 6, 'monday'));
if v_upd_row = 0 and v_cre_date_row > 0
raise_application_error ( -20001, 'Deleting has been disabled via a custom trigger.');