Developer Function: Server Script: grid.SelectedIds
## Overview
The "[Server Script](/en/manual/table-management-server-script)" gets the ID of the record selected on the list screen.
## Supported Versions
1. Pleasanter 1.3.34.0 or later
## Syntax
```
grid.SelectedIds()
```
## Parameters
none
## Return Value
Return the record ID of the corresponding record.
## Usage Example
The following example displays the ID of the selected record in the console.
##### Sample code
```JavaScript
for (let id of grid.SelectedIds()) {
context.Log(id);
}
```
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />