Parameters
NameTypeDescription
recordsys.data.Record

The record where the action will be executed.

This variable is only available if the type of the action is One record or if you are appliying the action to many records. In case of on change event the record is read only.

actionsys.data.ActionThis allows access to the parameters of the action. When the action is executed from the UI, changes made here will be reflected in the UI.
modifiedParameterstringA string with the name of the field that fires the event.
Samples
 
//sets the value as the email of the current user only if the field 'sendTo' has changed and is empty
if (modifiedParameter == 'sendTo' && action.field('sendTo').isEmpty()) {
  action.field('sendTo').val(sys.context.getCurrentUser().email());
}