Skip to main content

On Page Load

Triggered when the page containing the widget is initially loaded. This event is commonly used to initialize the widget, load default values, fetch required data, or prepare the widget state before any user interaction occurs.

Commonly used for :
  • Fetching record-level data when the widget initializes
  • Loading organization or configuration settings
  • Preparing UI layout before user interaction
  • Setting default values for editable fields
  • Registering lifecycle event listeners
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
   App.instance.on('ON_<MODULE_NAME>_PAGE_LOAD', function () {
   /* Actions */ 
   });
  })
};
Related Modules :