KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: SAVE RECORD and Triggers
PRODUCT: 4D | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: December 11, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

When using SAVE RECORD and a Trigger for On Saving an existing record, keep in mind that in 4D v11 SQL, the SAVE RECORD command only executes when a record has been modified. Therefore, if the record has not been modified, SAVE RECORD does not execute and the Trigger does not fire.

Optimization is the principal reason for the SAVE RECORD command only working when the record actually needs to be saved.

If you want the SAVE RECORD command to execute regardless of modifications to the record, you can force it by assigning a field its own value in your code such as:

[Table1]Field1:=[Table1]Field1