Skip to content

$p.id

Overview

Gets the site ID or record ID.

Syntax

JavaScript
$p.id()

Usage Examples

(1) Log in as the account manager and create a table.

(2) Create a new "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.