My mission is to check if a control is visible and if it is then to set it as required. On my form I have the same field twice (in different sections) so to check my control visibility I use this code:
if(Xrm.Page.ui.tabs.get("tab1").sections.get("section").controls.get("attrname").getVisible()) -works { Xrm.Page.ui.tabs.get("tab1").sections.get("section").controls.get("attrname").setRequiredLevel("required"); - doesn't work - error Xrm.Page.ui.tabs.get("tab1").sections.get("section").controls.get("attrname").getAttribute("attrname").setRequiredLevel("required");- doesn't work - error }
I have a prob in setting the specific attr/control as required, is it possible ?