AccountExpires = '30-Dec-1899 23:59:00'

Hi team,

we have just upgraded our 1IM instance to version 9.2 and immediately found an issue with ADSAccount.AccountExpires attribute.

The attribute has a value template script that calculates  ADSAccount.AccountExpires from Person.DateLastWorked.

--------------------------------------------------
. . .
'always end of the day 23:59
Value = $FK(UID_Person).DateLastWorked:Date$.Date.AddMinutes(1439)
. . .
--------------------------------------------------

The script calculates incorrect value of ADSAccount.AccountExpires = '30-Dec-1899 23:59:00' if Person.DateLastWorke has no value. That makes AD user accounts expired, and end users cannot login to domain.

In previous version (9.0), the value template script worked correctly,

Any thought?

Parents
  • Hi Sargay,

    as a workaround I would propose to use the template version used until 9.1 " ....    Value = DateValue(CStr($FK(UID_Person).DateLastWorked:Date$)).Date.AddMinutes(1439)...". You should open a bug request at support in parallel.

    regards,

       Tino

  • Hi, thank you for your answer.

    Yes, we tried to use the previous version of the value template script.
    And yes, it works correctly for empty values in Person.DateLastWorked.
    But... It works incorrectly for non-empty values in in Person.DateLastWorked. When we trying to save newly generated value, 1IM 9.2 returns an exception (below):

    - Error applying changes to database.
    - Conversion of 09/01/2025 23:59:00 to SQL string of type Date failed.
    - Local time values are not valid in the database. They have to be converted to UTC using DbVal.ToUniversalTime.

Reply
  • Hi, thank you for your answer.

    Yes, we tried to use the previous version of the value template script.
    And yes, it works correctly for empty values in Person.DateLastWorked.
    But... It works incorrectly for non-empty values in in Person.DateLastWorked. When we trying to save newly generated value, 1IM 9.2 returns an exception (below):

    - Error applying changes to database.
    - Conversion of 09/01/2025 23:59:00 to SQL string of type Date failed.
    - Local time values are not valid in the database. They have to be converted to UTC using DbVal.ToUniversalTime.

Children
No Data