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.

oldRecordsys.data.Record

The record before linked parameters are merged.

This variable is only available if the type of the action is One record.

querysys.data.Query

A query object with filters to find all records afected by this action.

This variable is only available if the type of the action is Many records.

actionsys.data.ActionThis allows access to the parameters of the action.
Samples
 
//updates some values in the record and save it
var newValue = action.field('param1') * 10;
record.field('field').val(newValue);
sys.data.save(newValue);
 
//many records actions that sums up the number of employees on selected companies
var total = 0;
var records = sys.data.find(query);
while (records.hasNext()) {
  total += records.next().field('numberOfEmployees').val();
}
return total;