I'm attempting to use this Javascript, found from another post on this forum:
function UpperCaseField()
{
var Name=Xrm.Page.getAttribute("name").getValue();
Xrm.Page.getAttribute("name").setValue(toTitleCase(Name));
}
function toTitleCase(str)
{
return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
I have it on the on change event of a field named ist_name. It is configured like this:

And I get this error on loading the form:

What am I doing wrong?
*This post is locked for comments
I have the same question (0)