Hello Everyone.
i have a question. i need to turn the text of two fields in upper case when i update the field.
i have this code but its not working, or if someone have a diferent code to turn the text of string field to Upper Case appreciate.
function UpperCase(){
var FIELDS_TO_UPDATE = ["Nome", "Descrição"]; //Update the field values to your field names
function onLoad() {
setToUpperCase(FIELDS_TO_UPDATE);
}
function setToUpperCase(fields) {
for (var i in fields) {
var str = Xrm.Page.getAttribute(fields[i]).getValue();
var Upper = str.toUpperCase();
Xrm.Page.getAttribute(fields[i]).setValue(Upper);
}
}
}