A customer request came in saying that all Company names are stored in uppercase but in Accelerator, we only capitalised the first letter and was there a way to capitalise the complete name.
There is!
Remember that these Accelerator screens are based on CRM screens, so you can add in custom content.
EG
Here is the code
<script type="text/javascript">
function forceInputUppercase(targetName)
{
var target=document.getElementById(targetName);
var start = target.selectionStart;
var end = target.selectionEnd;
target.value = target.value.toUpperCase();
}
$( document ).ready(function() {
document.getElementById("comp_name").onkeypress = function(){
setTimeout(function(){forceInputUppercase("comp_name"); }, 500);
};
setTimeout(function(){forceInputUppercase("comp_name"); }, 500);
});
</script>
A few technical points to note. The webbrowser control that displays the screen doesn’t quite behave the same as even IE (which is what it is based off of) otherwise we could have coded this differently. Events like onkeydown are not supported hence our timer.
You can still however do some nice customer pieces.
Happy coding!