Fixing Timeless Activity Displays in the Infor CRM 8.3.09 Web Client

In the Infor CRM 8.3.09 web client timeless activities in the sdata grid display their dates as one day off due to UTC offset incorrectly being applied to these records. The sdata grids all inherit from the Sage.UI.Controls.GridParts.Columns.DateTime widget. Because of this we can fix the base widget function returning the incorrect date value and it will effect all of the grids in the Web Client.

Using Ryan’s custom loader module all that is required is to create a new folder under the Custom/Modules area. I would suggest something like “TimelessActivityFix”. Then in this folder add a main.js with the following code:

function (
) {
	var convert = Utility.Convert;
	lang.extend(dateTime, {
	formattedDate: function (inRowIndex, inItem) {
            // summary:
            //	if given a date, convert it to local time and provide corresponding HTML
            if (!inItem)
                return '';
            var d = inRowIndex ? inRowIndex : this.defaultValue;

            this.dateOnly = (typeof this.dateTimeType === 'undefined') ? this.dateOnly : (this.dateTimeType.toUpperCase() === 'D');

            if (!d)
                return '';
            d = convert.toDateFromString(d, true);
            if (!d || d.constructor !== Date) {
                return '';
            var tless = false;
            if (this.timelessField && this.timelessField !== '') {
                tless = convert.toBoolean(Utility.getValue(inItem, this.timelessField, 'F'));
            if (this.useFiveSecondRuleToDetermineTimeless) {
                tless = activityUtility.isDateFiveSecondRuleTimeless(d);
            // TODO: edit mode?    
            if (!this.dateOnly && !this.datePattern) {
                if (!tless) {
                    return locale.format(d, { selector: this.formatType || 'date/time', fullYear: true, locale: });
                } else {
                    var timelessDate = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), 0, 0, 5);
                    return, { selector: 'date', fullYear: true, locale: }) + this.timelessText;
            } else if (this.datePattern) {
                // If this is a date-only value ("D" date time type), undo the local time conversion before formatting.
                if (this.dateOnly) {
                    d = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
                return d.format(this.datePattern, { locale: });
            } else {
                if (this.utc) {
                    var dateOnly = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
                    return locale.format(dateOnly, { selector: 'date', fullYear: true, locale: });
                else {
                    return, { selector: 'date', fullYear: true, locale: });

This function was lifted from the 8.4 version of the Sage.UI.Controls.GridParts.Columns.DateTime widget. Obviously in 8.4 this behavior is fixed.

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

  1. Today i discovered it is happening with the Date only Control on 8.4.

    You can test it on the Contact’s birthday… on the DB it will add the timezone to seconds instead of adding it to hours.


Submit a Comment

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