back to top

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:

require([
	'Sage/UI/Controls/GridParts/Columns/DateTime',
	'dojo/date/locale',
	'Sage/Utility',
	'Sage/Utility/Activity',
	'dojo/_base/declare',
	'dojo/_base/lang',
	'dojo/aspect',
	'dojo/dom-construct'
],
function (
	dateTime,
	locale,
	Utility,
	activityUtility,
	declare, 
	lang,
	aspect,
	domConstruct 
) {
	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: Sys.CultureInfo.CurrentCulture.name });
                } else {
                    var timelessDate = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), 0, 0, 5);
                    return dojo.date.locale.format(timelessDate, { selector: 'date', fullYear: true, locale: Sys.CultureInfo.CurrentCulture.name }) + 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: Sys.CultureInfo.CurrentCulture.name });
            } else {
                if (this.utc) {
                    var dateOnly = new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
                    return locale.format(dateOnly, { selector: 'date', fullYear: true, locale: Sys.CultureInfo.CurrentCulture.name });
                }
                else {
                    return dojo.date.locale.format(d, { selector: 'date', fullYear: true, locale: Sys.CultureInfo.CurrentCulture.name });
                }
            }
        }
    });
});

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.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
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.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos