show or hide Subgrid in d365 using JavaScript
In d365 we can get the control of the subgrid and then by using setVisible(true) or setVisible(false) property we can hide the subgrid.
setVisible(true) //show the subgrid
setVisible(fakse) //hide the subgrid
Ex.
function hideSubgrid(paramContext){
var formContext = paramContext.getFormContext();
var Controls = formContext.getControl();
console.log(Controls) // It will show all the controls
var getControl = formContext.getControl('control name').setVisible(false); // It will hide the control
}
formContext.getControl(); // This method will return all the control name available on form or page
Please Leave a comment if anything is required.
d365
dynamics365
mda365
mda365.blogspot.com
Thanks
