Wiring your event programmatically
In the previous recipe, we wrote our first JavaScript function and wired it manually. If you are going down the custom development path, always keep in mind future maintenance tasks. Rather than wiring your events manually through the user interface, consider doing it programmatically. Not only will that reduce the manual steps to configure your extensions, but it will also give you one location to view/maintain all the event wiring.
Getting ready
In order to wire your event programmatically, you'll need a candidate function to wire (we will use the function from the previous recipe), an IDE to write your code, and, of course, access to a Dynamics 365 instance with the System Customizer
or higher security role.
How to do it...
- Navigate to
Settings
|Solutions
|Packt
. - Click on
Web Resources
and double-click onpackt_common.js
. - Click on
Text Edit
and add the following lines of code to your library:
packtNs.graduateForm = packtNs.graduateForm || {}; packtNs.graduateForm...