I've got a problem with a little a capitalisation script that is supposedly good that I copied from another source, the problem is I can't get it to work. I'm sure I am missing something vital here. Any suggestions would be greatly appreciated.
----
String.prototype.capitalize = function() {return this.charAt(0).toUpperCase() + this.slice(1);
};
function capitalName() {
var fullName = Xrm.Page.getAttribute("fullname").getValue();
fullName.capitalize();
Xrm.Page.getAttribute("fullname").setValue(fullName);
}