Hi all
Be carefull the example script for Row_Updated has a typo: (v10, not v11)
This event will be called after updating a record. The arguments of the event are the arrays of the old and new record updated.
Example
After updating a field in detail table, update a field in the master table.
function Row_Updated($rsold, &$rsnew) {
//var_dump(rsold, rsnew); die(); // Print the old and new record and end the script
$rs = array();
$rs["FieldInMasterTable"] = $rsnew["FieldInDetailTable"]; // Set field values
(new cMasterTable())->Update($rs, "PrimaryKeyFieldInMasterTable = " + rsnew["ForeignKeyFieldInDetailTable"]); // Note: Table class is named as c<TableName>. Assume PrimaryKeyFieldInMasterTable is integer.
}
In the function the second time rsnew is without the & sign.
rehgards, René