I have a fairly complex trigger that upserts accounts when records of a 2nd object are inserted or updated.
We also have a duplicate rule in Account that is set to detect dupes but "Allow" if the user wants to. We really only want the GUI users to get stopped, since these 2nd objects' records are the source of truth and any dupes are ok if this trigger inserts them.
Ideally, I know that if I am doing inserts or updates I can set
allowSave = true. However, this option is not present for upserts.
Does anybody know a way to get this done without having to separate the DMLs into update and insert and make two calls? (I am using the
ID for the upserts so it wouldn't be the end of the world, but I am trying to keep the DMLs down)