PL 400: Register an event handler (Apply business logic using client scripting)
Script web resources can be used to maintain libraries of client script functions that are written in either JavaScript or TypeScript and can be accessed within a model driven app form or from a command bar ribbon definition. Client scripting logic runs event handlers for form events. The use of form properties creates a static configuration of event handlers at design time. In the form designer, we can register event handlers for the following events:
Form : This allows us to register OnLoad and OnSave event handlers.
Tabs: This allows us to register events for each tab on the form for tab state change.
Columns: This allows us to register and even handler if column data is changed.
To upload the script web resources:
Select the web resources:
Upload the script:
Client Scripting logic runs as event handlers for form events:
- We need to register the event handler to execute the logic
- Registration for general events can be done through the form.
- Some events can only be registered from code.
- Event handlers can run in multiple forms but must be registered for each separately.
Comments
Post a Comment