Hi Everyone,
Today I was writing JavaScript code to disable the field on some condition and observed that the field is not getting disabled. I was little surprised and tried with some other field and it worked perfectly. By this, I understand that there is some problem with this field and after some search understood that the same field has been placed on other tabs as well.
To fix it, we just have apply loop through the control. Here is the sample code for the same.
formContext.getAttribute("SchemaName").controls.forEach(
function (control, i) {
control.setDisabled(true);
});
Hope this helps.
—
Happy 365’ing
Gopinath.