Please enable JavaScript to view this site.

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

getNextSelectedRecord()

Scroll Prev Next More

 

Returns associative arrays with values of the records selected on the List page (marked with checkboxes). If nothing is selected or all selected records are processed, returns false. It is available for any button on the List page.

Syntax

getNextSelectedRecord()

Arguments

No arguments.

Return value

Returns an array with values of the records selected on the List page (marked with checkboxes). If nothing is selected or all selected records are processed, returns false.

Example

Send emails to the selected customers:

 

DoAssignment record, button.getNextSelectedRecord()
do while isObject(record)
  message = "Dear " & record("FirstName")
  sendmail record("email"), "Greetings", message
  DoAssignment record, button.getNextSelectedRecord()
loop

See also:

runner_mail function

Buttons: getCurrentRecord()

Tri-part events

Page Designer: Insert custom button

Buttons: Button object