function fields() {
var i;
for (i = 1 ; i <= 20; i++) {
//convert i into string
var j = i.toString();
var obj = “new_field” + j;
alert(obj);
Xrm.Page.ui.controls.get(obj).setVisible( false);
}
}
SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012