A customer request came in saying that all Company names are stored in uppercase but in Accelerator only capitalised the first letter and was there a way to capitalise the complete name.

And there is.

Remember that the screen is based off of CRM and so you can add in CustomContent to the screen.


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);	    

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.

But you can still do some nice customer peices.

Happy coding!

You may also like

Join our newsletter

The Business Predictability Blueprint

The Business Predictability Blueprint

Our free e-book will help you learn gain more structure within your business, better predict your pipeline, achieve consistency and start feeling more in control.

Get it now