Hi All,
I have a requirement where i need to count the number of characters in a field and display an alert message to the user when it is less than 20.
I am using the following code to execute.
function countchars(){
var fieldtext = Xrm.Page.getAttribute("description").getValue();
if(fieldtext != null){
if(fieldtext.length < 20){
alert(Enter more than 20 characters);
}
}
}
Please advise.
*This post is locked for comments