Skip to content

$p.events.on_grid_load

Overview

This explains how to specify a method to be executed when the "Screen Index","Dashboard" is loaded or when the displayed content is changed by a filter, etc.

Limitations

  1. Select "All" for "Output to", except where this would have side effects such as the process running at unintended times.
  2. If you create multiple scripts and write this function in each of them, the scripts are overwritten, so only the latest one works. For a workaround, refer to the following FAQ.

Syntax

When setting up a script, be sure to check "Index" for "Output to."

JavaScript
$p.events.on_grid_load = function () {
    //Processing content
}

Usage Examples

If you set the following sample code to Pleasanter script, a message will be displayed at the bottom of the screen when the Screen Index is loaded.

JavaScript
$p.events.on_grid_load = function () {
    $p.setMessage('#Message', JSON.stringify({
        Css: 'alert-success',
        Text: 'Now that the Screen Index has been loaded, we will display the screen.'
    }));
}

FAQ: I want to be able to set multiple $p.events.on_editor_load