In before insert trigger I want to check if the record is already present and skip creation of a record if so. We use external backend system which sometimes fails and sends duplicate records (nobody wants fixing it).
In before insert trigger I tried to delete
reference to a record, didn't work. AddError
also doesn't work as we want to keep process bulkified and automated.
Is there a simple way to do this?
As an idea is after creation of records run scheduler which will find duplicates and remove the last one created. But it's not an easy way :_