The onScriptInit event is executed every time the application is loaded or reloaded, before the interface is displayed and before the main logic is executed.
At this point, all global variables, macros, and libraries are already available for use, allowing dynamic configuration of the application's behavior.
It is ideal for preparing filters, defining display conditions, managing database connections, or adjusting execution parameters.
Unlike the onApplicationInit event, which runs only once at the beginning of the application, onScriptInit runs on every full load of the application — including after using filters, navigating between pages, or changing parameters.