Scripts
Button Design can attach Studio scripts to button click phases.
Use scripts when a button needs validation, confirmation, draft changes, child-table changes, messages, notifications, modals, or runtime refresh behavior.
Script Settings
| Setting | Phase |
|---|---|
| Before Click Studio Script | Runs before the button action starts |
| Studio Script Executed On Click | Runs as the main action for custom buttons |
| After Click Studio Script | Runs after the button action succeeds |
Preset buttons keep their system action. Their before-click and after-click scripts can extend behavior around the system action.
Custom buttons use the click Studio script as their main action.
Edit A Script
After selecting a script, use Edit Studio Script to open the current script in Studio.
The page asks for confirmation before opening the script editor.
Runtime Effects
Button scripts can return runtime effects such as field state, field value, field error, child-table effects, messages, notifications, modals, and refresh requests.
For script payloads, click phases, and returned effects, see Button Interaction Events.