In the Technical Documentation for before and after commands, it says that
- The
CrudOperationvariable can be used to get the operation (create,updateordelete).
Can we use the CrudOperation and only have something execute upon ‘update’?
For example:
@Override
list ItemsList for ContractItem {
crudactions {
before command CContractItemValidation;
}
}
and then
command CContractItemValidation for ContractItem {
mode = SelectedRecords;
variable CContractItemString Text;
variable CValidation Boolean;
bulkexecute {
if [CrudOperation = "update"] {
stringify(records, "DATA", JSON) into CContractItemString;
call CValidateContractItems(CContractItemString) into CValidation;
}
}
}
Anybody came across this kind of scenario?
Where you have to validate the updates done to multiple records before being saved.
