Skip to main content

actionID()

Last updated 30/03/2023

Example One

This code is checking if the actionID on the object Five is equal to the string "Buys". If it is, then the code inside the curly braces following this line will be executed, otherwise the code in the else block.


CalculateTotal
function CalculateTotal(five: Five, context: any, result: FiveError) : FiveError  {
if (five.actionID() === 'Buys') {
five.field.Total = five.field.Quantity * five.field.Price + five.field.Fees;
} else {
five.field.Total = five.field.Quantity * five.field.Price - five.field.Fees;
}
return five.success();
}