Here are some key things to remember when working with server triggers.
- Use before record load rather than before user edit when configuring actions that affect the display characteristics of form fields when loading a record.
- If you want an action to execute only once when entering or exiting a state, use the entry or exit server trigger.
- If a user refreshes their browser cache, any actions set to execute on entry or exit will not execute again. The record does not enter the state again. The record form is only reloaded in the browser.
- The entry trigger differs from the before record load trigger in that actions set to execute on entry do not need to be loaded into the browser.
When a record is saved,
- use the before record submit trigger when setting record data and performing validations.
- Use the after record submit trigger when creating related records, sending emails, and navigating users to other pages or records in NetSuite.