Developer Function: Scripts: $p.id
## Overview
Gets the site ID or record ID.
## Syntax
##### JavaScript
```
$p.id()
```
## Usage Example
(1) Log in as the account administrator and create a table.
(2) Create a new "[Script](/en/manual/table-management-script)" and enter the following script content. Check "All" for the output destination and update it.
##### JavaScript
```
$p.events.after_set_Update = function () {
$p.setMessage('#Message', JSON.stringify({
Css: 'alert-success',
Text: 'The record ID is [' + $p.id() + '].'
})
);
}
```
(3) Update any record and verify that a message is displayed at the bottom of the screen.