Wondering if someone can help with this. I am using the below JavaScript which works fine in the classic interface, but does not do anything when viewing the same record in the "Sales Hub" / Model Apps. I have checked the browser console and there are no errors etc...
Any idea why the below will not run in the "Sales Hub" / Model Apps?
var isthething = Xrm.Page.getAttribute('fieldwiththething').getValue(); if (isthething == '181870000') { Xrm.Page.ui.controls.get('SubG1').setVisible(false); Xrm.Page.ui.controls.get('SubG2').setVisible(false); Xrm.Page.ui.controls.get('SubG3').setVisible(false); Xrm.Page.ui.controls.get('SubG4').setVisible(false); } else { Xrm.Page.ui.controls.get('SubG1').setVisible(true); Xrm.Page.ui.controls.get('SubG2').setVisible(true); Xrm.Page.ui.controls.get('SubG3').setVisible(true); Xrm.Page.ui.controls.get('SubG4').setVisible(true); }