Editable Grid: Make it read only

We have a out the box option to make editable grid read only on the from it self but its applicable only for the views not for the sub-grids. Thus, with small JavaScript we can make it read only based on our business requirements. Here is the sample code for it function setFieldsDisabled(context) { context.getFormContext().getData().getEntity().attributes.forEach(function…

Refresh Sub-Grid based on field value

Some time we need to refresh MSD 365 sub-grid data based on some condition. This can be done with small JS, here is the sample code, its applicable to editable grid as well…. function FilterSubgridBasedOnField() { var sGrid = window.parent.document.getElementById(“booked_asset”); if (sGrid == null) { alert(“Grid is null”); setTimeout(function () { FilterSubgridBasedOnAssetGroup(); }, 2000); return;…

Call action with input & output parameters

Many times we need to send and or receive parameters from plugin to JavaScript and vice a versa. So here are the steps for it… Create an action with input & output entity reference parameters. Make sure all parameters are required. In your JS code function CreateWID(firstEntiryGuid, secondEntityGuid) {       var data =…

FetchXML Query with NOT-IN

If you want to get all available Resources of specific Resource Category that don’t have any booking for the particular period with FetchXML,  I tried NOT-IN clause and landed in following error, Microsoft.Crm.CrmException: Unknown Condition Operator: not- in at Microsoft.Crm.Platform.QuerySerializationUtil.ConditionOperatorFromString(String operatorText) But OUTER join worked for the scenario and it gave the correct result. With small…