Gets the current record.
Syntax
getCurrentRecord()
Arguments
No arguments.
Return value
If the button is inserted in the grid on the List or Edit/View page, it returns an associative array (field name => value). Otherwise it returns false.
Example
Let's assume we have a button on the Classified Ad View page, which helps us send an email to the person who posted the announcement. We are grabbing email address of the person who posted the ad and passing to the Add page of Reply table.
Server:
dynamic record = button.getCurrentRecord();
result["email"] = record["email"];
ClientAfter:
location.href='reply/add?email='+result["email"];
See also:
•Buttons: getNextSelectedRecord
•Page Designer: Insert custom button