I have create this code below
function UpperCaseField(fieldName) {
var value = Xrm.Page.getAttribute(fieldName).getValue();
//VALUE NOT NULL, CHANGE TEXT TO UPPERCASE
if (value != null) {
Xrm.Page.getAttribute(fieldName).setValue(value.charAt(0).toUpperCase() + value.substr(1).toLowerCase());
Xrm.Page.ui.clearFormNotification('1');
}
//VALUE EQUAL TO NULL,DISPLAY WARNING NOTIFICATION
else
{
Xrm.Page.ui.setFormNotification('Cannot be BLANK','WARNING','1');
}
}
That takes in the value from a text field and converts the First Letter of the first word of a string to uppercase. e.g, New york, it should be New York.
microsoft dynamic crm is the best -> Microsoft Dynamics Crm Is The Best .
I have tried multiple combinations , but none of them worked.
Can anyone help?
*This post is locked for comments
I have the same question (0)