Skip to content

Script is not executed after pressing the update button on the edit screen

Answer

Please use "$p.events.on_editor_load".


Overview

The specification has been changed so that when you press the update button on the editing screen, the entire screen is automatically refreshed.
As a result, there are cases where the script that was running on the editing screen does not work as intended after pressing the update button.

Solution

Use on_editor_load

Applicable: Pleasanter.net, open source version

By selecting "Edit" as the output destination and placing the script under on_editor_load, the script will be executed when the editing screen is loaded during a refresh.

JavaScript
$p.events.on_editor_load = function () {
    //Existing process
}

Developer's Guide: Script functions: $p.events.on_editor_load

Change Settings In General.json

Target: Open source version

Change UpdateResponseType in General.json from 0 to 1. When changing the Json file, a reload is required, so please check the link in the notes below.
*After changing the settings, the server script function, such as the function to make column read-only, will no longer work.

Parameter settings: General.json

Cautions

Please refer to the following for notes on changing parameters.
About changing parameters