Please enable JavaScript to view this site.

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

getMasterRecord()

Scroll Prev Next More

 

Gets the master record. Only makes sense, when button is added to one of details table pages.

Syntax

getMasterRecord()

Arguments

No arguments.

Return value

Returns an associative array (field name => value) of master record.

Example

In this example we are adding button to one of details table pages. Using getMasterRecord() function we retrieve the email address from the master table and passing it to another page.

 

Server:

 

DoAssignment record, button.getMasterRecord()
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