नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
JavaScript client-side scripting provides a powerful way to apply custom business logic for displaying data on forms in model-driven apps.
Important
All the client scripting concepts and APIs explained in this documentation also apply to Dynamics 365 Customer Engagement (on-premises) users.
However, don't use client scripting as your first choice for applying custom business process logic in model-driven app forms. Business rules provide a way for someone who doesn't know JavaScript and isn't a developer to apply business process logic in a form. For more information, see Create business rules to apply logic. You find the business rule designer within the Data > Tables > [table_name] area on make.powerapps.com. When you view table, look for the Business rules tab.
However, if your business requirement can't be achieved by using a business rule, client scripting by using the client API object model provides a powerful way to extend the behavior of the application and enable automation in the client.
Use client scripting in model-driven apps
Forms in model-driven apps help display data to the user. A form in model-driven apps can contain items such as columns, a quick form, or a grid. An event occurs in model-driven apps forms whenever:
- A form loads.
- Data changes in a column or an item within the form.
- Data is saved in a form.
You can attach your JavaScript code to "react" to these events so that your code gets executed when the event occurs on the form. You attach your JavaScript code (scripts) to these events by using a Script web resource in model-driven apps.
Model-driven apps provide you with a rich set of client APIs to interact with form objects and events to control what and when to display on a form.
Note
Some client APIs are deprecated in the current release of model-driven apps. Ensure that you're aware of these APIs as you write your client-side code for model-driven apps. For more information, see Deprecated client APIs.
Next steps
Reference
Related articles
Web resources for model-driven apps
Customize commands and the ribbon