In the SalesLogix web client there is code to handle parsing phone numbers in the SalesLogix phone web control for numbers using "x" to denote the start of an extension (i.e. 6515551111x123). There is also code in place to handle phone numbers using "ext" as the extension designator however this code has a syntax error. The result of this is that phone numbers using this extension designator will throw a client side java script error. That is bad news because it will cause other client side actions (like switching between tabs) to not work.
Luckily the error in the "ext" parsing is available to be fixed. It is in the client side code file that the SalesLogix web controls use, sage-controls.js.
Lets take a look at modifying it. The java script file is located in the VFS under the SLX portal, support files and then under the jscript\sage-controls folder. The deployed file is pushed out to SlxClient\jscript\sage-controls\sage-controls.js:
The code in question is contained in the FormatPhoneNumber function. Lets look at how we need to modify it. Below is the portion of the code that needs to be changed.
The green lines are the commented out original lines. The red lines are the new bits. The highlighted sections are the important new changes.
function FormatPhoneNumber(val)
{if((val.length==0)||(val.charAt(0)=="0"))
return val;var ext="";var temp=val;var vTempExt="";var extFound=false;var isInter=false;var extAtBegin=false;var i=-1;if(val.charAt(0)=="+")
{isInter=true;}
val.replace("/\D+/g.","");i=val.indexOf("ext");if(i>-1)
//{ext=val.substring(i);temp=val.substring(0,value.length-ext.length)
{ext=val.substring(i);temp=val.substring(0,val.length-ext.length);
//vTempExt=ext.substring(3,ext.length);ext=val.substring(i,3);extFound=true;if(i==2)
vTempExt=ext.substring(3,ext.length);ext="ext";extFound=true;if(i==0)
{extAtBegin=true;}}
else
...
This code is only applicable in 7.5x. In the new 8x version this code has all been completely re-done.