Cannot update/change user login ID as desired. It is changed back to the original ID automatically because there is a soft deleted record with the same login ID

Version 4

    Verified Product Versions

    LANDESK Service Desk 7.6LANDESK Service Desk 7.7.xLANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.xLANDESK Asset Central 2017.xLANDESK Service Desk 2017.x

    Exact Symptoms:

    When changing the login ID of an existing account to another, it seems as if It's been saved but the new ID never works. The login ID is still the previous one.

    Error message:

    Cannot create a record with name 'XXX'. A soft-deleted record already exists. This record should be restored or renamed.

     

    The screenshots below were taken using an out-of-the-box database to replicate the issue:

    *Full Name and Login ID are mandatory fields.

     

    1) I created a new end user called "Eric" as an example:

    20160810111157.png

    2) I soft-deleted the user record. If I try to create a new end user with the same name, the error below occurs:

    20160810111301.png

    3) I created a new user record named "Eric2."

    20160810113859.png

    4) I modified Eric2's login ID to "Eric" and saved. The Console displays that it has been changed to "Eric" in the screenshot below.  However, when I reload this end user, the login ID is still "Eric2."

    20160810111730.png

     

    Reason:

    There is an end user with a login ID that already exists in the soft-deleted records.  It cannot be changed as desired.

     

    Resolution:

    Restore the soft-deleted user, or use SQL to hard-delete the user in the database. Afterward, the login ID can be changed to the desired one.

    The best way to avoid this in the future is to first soft-delete a user, and add a prefix to the primary key, such as "XXXX_."