Formatting the dates that appear in the Notes/History grid in the SalesLogix 7.5.4 web client

In the SalesLogix web client, the new 7.5.4 notes and history grid uses the new editable grid control to display history.  The grid has the complete date as one of the columns.  by default the date will show as 3/22/8 for a history record completed on March 22, 2008.  So how do you change the format of the date?  Well let’s take a look.

In the VFS under the Portal Manager you will find the following path Support Files…jscript…Sage…UI…Columns.  In the folder you will see a datetime.js file.  if you open this up this is where the date formatting exists.

In the 7.5.4 version, on line 40 you will see the following:

return, { selector: this.formatType || ‘date/time’ }); //datePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern, timePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortTimePattern,

You can change this line to (new text shown highlighted):

return, { datePattern: “MM/dd/yy”, formatLength: “short”, selector: (this.formatType || ‘date/time’) }); //datePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern, timePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortTimePattern,


This will handle formatting of non-timeless History.  To change the Timeless history records you need to modify line 46 similarly.  From this:


return, { selector: ‘date’ }) + this.timelessText;  //datePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern,


To this (new text shown highlighted):


return, { datePattern: “MM/dd/yy”, formatLength: “short”, selector: ‘date’ }) + this.timelessText;  //datePattern: Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern,


Now the date will be formatted as specified in the datePattern parameter.  See this post for additional info on the function.

Want content like this delivered to your inbox? Sign up for our newsletter!

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

1 Comment

Submit a Comment

Your email address will not be published. Required fields are marked *