Showing posts with label Subgrid-Control. Show all posts
Showing posts with label Subgrid-Control. Show all posts

Dynamically Hide the “New” Button in a Dynamics 365 Sub-Grid

In some business scenarios users should only add one (or two) child records. The quickest way to enforce this in Dynamics 365 is to hide the New button after the sub-grid reaches a specific row count. This article shows how to:

  1. Create a JavaScript enable rule that counts rows.
  2. Refresh only that sub-grid’s ribbon so the rule re-evaluates instantly—no full form reload.

Understanding Context References in Dynamics 365 Subgrid and Form Customizations

Understanding Context References in Dynamics 365 Subgrid and Form Customizations using Ribbon Workbench

In Dynamics 365, JavaScript customizations offer a powerful way to enhance the user interface and functionality. A common scenario involves custom ribbon buttons that execute JavaScript functions. These functions often require context about the form or subgrid from which they are invoked. This article clarifies how to access and use these contexts effectively.