Hide “+” and “See Associated records” buttons in subgrid based on value of a field

Create a web resource with a simple JavaScript method that will return true or false depending on the value that you want to validate, find below an example: Create a new solution with only the Entity that you want to customize (The entity of the subgrid).Open XRM Toolbox -> Ribbon Workbench.Open the Solution created in … Continue reading Hide “+” and “See Associated records” buttons in subgrid based on value of a field

Advertisements

Change field requirement level with JavaScript – Dynamics CRM

To dynamically change the requirement level of a field, use the code below: //  Not required Xrm.Page.getAttribute("FieldName").setRequiredLevel("none"); // Business recommended Xrm.Page.getAttribute("FieldName").setRequiredLevel("recommended"); // Required Xrm.Page.getAttribute("FieldName").setRequiredLevel("required");