Hi All,
I want hide the subgrids based on option set, but this optionset is updated through integration.
I know that we can write the js and register on load of form and on change of optionset, but for some reason I cant seem to achieve my requirement and below is my code
function hidesubgrid(executionContext)
{
var formContext = executionContext.getFormContext();// get the form Context
if(formContext.getAttribute("xxxx_xxxx_status").getValue() == 0 || formContext.getAttribute("xxxx_xxxx_status").getValue() == 1 )
{
formContext.getControl("xxxxxxxsubgrid").setVisible(false);//Hide Subgrid
formContext.getControl("yyyyyyysubgrid").setVisible(false);
}
else if(formContext.getAttribute("xxxx_xxxx_status").getValue() == 2)
{
formContext.getControl("investmentsubgrid").setVisible(false);
}
}
Regards,