Hi
I am using Dynamics 365 on premises and am trying to hide a subgrid based on a check box and am using the following code:
function checkBoxShowTab() {
try {
var checkbox = false:
var check = Xrm.Page.getAttribute("new_kinegrampatch");
if (check != null)
{
checkbox = check.getValue();
}
if (checkbox)
{
Xrm.Page.ui.controls.get("SubFeatures").setVisible(true);
}
if (!checkbox)
{
Xrm.Page.ui.controls.get("SubFeatures").setVisible(false);
}
}
catch (e) {
Xrm.Page.ui.setFormNotification(e.message, "WARNING", "Exception");
}
When the check box is ticked, I get the following error:
Can anybody point out where I am going wrong as I am new to js.
thanks