WHEN-CHANGED before WHEN-NEW-INSTANCE?
-K-Nov 22 2006 — edited Dec 15 2006Hi,
Tried to find something related on the forum and Metalink, but in vain.
Did someone notice, at least in Forms 9, that WHEN-CHANGED triggers fire before WHEN-NEW-INSTANCE triggers? Seems like a nasty bug.
Let me explain what I do:
Because part of the validation is done in the database PRE- triggers, I put a POST inside the WHEN-NEW-RECORD-INSTANCE, thus preventing the user to navigate out of the record if his last change was invalid.
In a master-detail situation I have a list item in the detail block. A user can make significant changes in the master block (or just add a new one), then navigate directly to the list in the detail block and change it. Its WHEN-ITEM-CHANGED trigger fires, but before WHEN-NEW-RECORD-INSTANCE. When the latter fires, it tries to post the master alongside the list-changed detail, which it shouldn't (and can't because the user hasn't finished yet with the detail record). If WHEN-NEW-RECORD-INSTANCE fired before WHEN-ITEM-CHANGED, the detail's status would still be query or new at the time of posting.
Does anyone know a workaround? Posting in some other trigger (doubt it's possible maintaining the same effect)? A patch if it's a known bug?
Thanks for taking interest,
K.