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:

 

XVar record;
while(record = button.getNextSelectedRecord())
{
  string message = "Dear " + record["FirstName"].ToString();
  MVCFunctions.runner_mail(new XVar("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