This topic is locked

Update multiple records and fields on the List page

7/17/2019 11:17:44 AM
PHPRunner General questions
R
ruud author

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?