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:

 

while($record = $button->getNextSelectedRecord())
{
  $message = "Dear ".$record["FirstName"];
  runner_mail(array('to' => $record["email"], 'subject' => "Greetings",
'body' => $message));
}

See also:

runner_mail function

Buttons: getCurrentRecord()

Tri-part events

Page Designer: Insert custom button

Buttons: Button object

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software