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

An undeclared property ”{FieldName}” which only has property annotations in the payload but no property value was found in the payload

Problem Today while using the Web Api to update "Account Name" lookup field of a contact I started to get the error below: "An error occurred while validating input parameters: Microsoft.OData.ODataException: An undeclared property 'parentcustomerid' which only has property annotations in the payload but no property value was found in the payload. In OData, only … Continue reading An undeclared property ”{FieldName}” which only has property annotations in the payload but no property value was found in the payload

OptionSet fields and Javascript – Dynamics CRM

In order to get and set values in an OptionSet field in JavaScript, use the code below: // Get Option Set var Option_Set = Xrm.Page.data.entity.attributes.get("FieldName"); // Get Option Set / Selected Option var OptionSet_Selcted_Option = Xrm.Page.data.entity.attributes.get("FieldName").getValue(); // Get Option Set / Options var OptionSet_Options = Xrm.Page.data.entity.attributes.get("FieldName").getOptions(); // Get Option Set / Label text var OptionSet_Label_Text … Continue reading OptionSet fields and Javascript – Dynamics CRM