


In the left navigation pane, select Data and then select Tables.įrom the list of tables, select the table where you want to add the JavaScript web resource. You use Script web resources in model-driven apps to upload the script to your model-driven apps instance, and then associate it with events.
Scriptcase using events to connect forms code#
Now that your code is ready, you want to associate it with events in model-driven apps. Step 2: Add your JavaScript code in a Script web resource As a best practice, you should always create namespaced JavaScript libraries to avoid having your functions overridden by functions in another library. Let's look at the code in detail: Detailed code explanationĭefine namespace: The code starts by defining a namespace for your custom script. You can review the complete sample code used in the walkthrough later in this article. So, you can use an external authoring tool that provides features to specifically support editing JavaScript files, such as Notepad++, Visual Studio Code, or Microsoft Visual Studio. Model-driven apps do not provide a JavaScript editor. Once you have identified it, you need to write your JavaScript code containing the custom business logic that addresses your business issue. The first step is to identify the business issue you are trying to address using client scripting. Step 1: Write your custom JavaScript code We will draw your attention to important facts during the walkthrough, and provide references to actual methods as appropriate. Associate the JavaScript functions in the web resource to different client-side events in model-driven apps.

Scriptcase using events to connect forms how to#
ObjectiveĪfter completing this walkthrough, you will know how to use your JavaScript code in model-driven apps, which involves the following steps at a high level: Ready to write your first client script to see things in action.
