global $dal;
while ( $data = $button->getNextSelectedRecord() ) {
// set ReportsTo field to 'Bob Smith'
$sql = "Update VoucherLines SET FinalExportYN='1',DateFinalExport=CURDATE(),FinalExportBy='getUserName()' where VoucherLinesID=".$data["VoucherLinesID"];
CustomQuery($sql);
}
$result["txt"] = "Records were updated.";
►►It is about FinalExportBy: I also tried Security:: getUserName and lots of other possibilities. No success.
►► How do I get the username in the field FinalExportBy?