Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Buttons > Button object > Methods

getCurrentRecord()

Scroll Prev Next More

 

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:

 

DoAssignment record, button.getCurrentRecord()
result("email")=record("email")

 

 

ClientAfter:

 

 

 

location.href='reply_add.asp?email='+result["email"];

 

 

 

 

See also:

Buttons: getNextSelectedRecord

Tri-part events

Page Designer: Insert custom button

Buttons: Button object