logo
search
Others

Fix Editable Grid Click Events Not Triggering in Dynamics 365

Phi Hung VoPhi Hung Vo Sep 29, 2026 869 views

Question details

The user needs to resolve an issue where a JavaScript web resource event handler fails to trigger when clicking or selecting a row in a Microsoft Dynamics 365 editable grid.

How to Fix Editable Grid Click Events Not Triggering in Dynamics 365
Product
Microsoft Dynamics 365
Device & OS
not provided
Scenario
Attempting to trigger a custom JavaScript function upon selecting or clicking a row within an editable grid.
Observed behavior
The JavaScript web resource event handler does not execute when a row is clicked or selected in the editable grid.
Before you start

Ensure you have the System Administrator or System Customizer security role in Dynamics 365 to access the form editor, edit grid properties, and publish customizations.

Solution 1Recommended

Switch to Supported Editable Grid Events (OnRecordSelect)

Standard DOM click handlers are unsupported in editable grids; you must configure native Dynamics 365 Client API events like OnRecordSelect to ensure the script triggers correctly.

Microsoft Dynamics 365 editable grids have specific client-side events and do not expose standard HTML row-click events. Relying on DOM click handlers will fail.

Instead, map your JavaScript web resource to the supported OnRecordSelect event, which is designed specifically for this scenario.

1
Open the Form Editor

Navigate to Dynamics 365 Settings > Customizations > Customize the System, expand the relevant entity, and open the Form containing the editable grid.

2
Access Grid Properties

Double-click the editable grid control on the form to open the 'Set Properties' dialog box.

3
Configure the Events Tab

Navigate to the 'Events' tab. Under the 'Event Handlers' section, change the event dropdown to 'OnRecordSelect'.

4
Add the JavaScript Web Resource

Click 'Add', select your JavaScript web resource library, input the exact function name, and check the box for 'Pass execution context as first parameter'.

Switch to Supported Editable Grid Events (OnRecordSelect)
Avoid DOM Manipulation: Using unsupported DOM click events is strongly discouraged by Microsoft, as these methods are prone to breaking after platform updates.
Free Microsoft Office alternative

Enhance Your Productivity with WPS Office

While Dynamics 365 handles your CRM and ERP workflows, you often need to export grid data for reporting or draft detailed documentation. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, allowing you to effortlessly view, edit, and manage your exported Word, Excel, and PowerPoint files with a familiar UI.

  1. 1. Visit the Official Website: Go to the official WPS Office website to access the latest free version.
  2. 2. Download the Installer: Click the 'Download' button corresponding to your operating system (Windows, Mac, or Linux).
  3. 3. Install and Run: Open the downloaded installer file and follow the straightforward on-screen instructions to set up WPS Office on your device.
Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint formats.Seamlessly format, analyze, and present data exported from Dynamics 365 grids.Lightweight design that runs smoothly without consuming excessive system resources.Familiar, easy-to-use tabbed interface ensuring zero learning curve for new users.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my OnRecordSelect event not firing in Dynamics 365?

The OnRecordSelect event may not fire if the web resource is not properly linked in the editable grid's event handlers, if 'Pass execution context' is unchecked, or if there is a syntax error in your JavaScript code preventing the execution.

Can I use standard HTML onClick events on a Dynamics 365 editable grid?

No, Microsoft Dynamics 365 editable grids do not support direct HTML DOM manipulation or standard onClick events. You must use the supported Client API object model events, such as OnRecordSelect or OnChange.

How do I pass the execution context to my editable grid JavaScript function?

When configuring the event handler in the Form Editor's grid properties, double-click the assigned event handler and ensure the checkbox labeled 'Pass execution context as first parameter' is ticked in the Handler Properties dialog box.