Introduction

Completed

A static model-driven app form shows whatever data a record happens to contain and runs the same command regardless of context. Client-side logic changes that experience. JavaScript that targets the Client API, calls to the Dataverse Web API, and commands built with Power Fx all change what a form can do. A form can validate what a user enters, retrieve current data from elsewhere, and guide the user toward the right next step as they work.

Consider an internal equipment-provisioning system built on a custom Dataverse solution with four tables: Employee, Device, Request, and Allowance. An employee opens a model-driven app to request replacement equipment, such as a laptop or a monitor.

Before a coordinator approves and fulfills that request, the form needs to confirm the employee's eligibility against their allowance and check current stock by calling an external availability service. Each of these checks depends on logic that runs directly on the form and reacts to what the employee enters. It doesn't depend on a coordinator remembering to verify everything by hand later.

In this module, you explore how to build code that targets the Client API object model and decide on an event handler registration approach for that code. You then learn how to write client scripts that call the Dataverse Web API and wire that logic into commands and buttons with Power Fx and JavaScript. Finally, you explore how to guide users through the process with navigation, dialogs, and notifications built with the Client API.

By the end of this module, you can apply client-side logic, including scripting, data access, and UI feedback, to model-driven app forms and commands. That way, they respond to data and user actions in real time.