Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

incomplete user id in created_by field

Abishek1998
Tera Expert

Hi all,
So we have experienced an issue in user accounts. The email field length was set to 40 by default which resulted in truncated emails as those were more than 40 characters. We've changed those manually and updated each of their user id's and emails. Now the issue is in the HR Agent workspace, whenever they are trying to create a new list, they can't create and in the sys_ux_my_list table, it is showing as created by old user id which was incomplete. I am attaching the image below. m is missing in the attached image. Even though I have changed it manually. How do I fix this?

Abishek1998_0-1786300533252.png

 

1 ACCEPTED SOLUTION

@Abishek1998 

if OOTB field then avoid modifying it

Did you try to check some other UI builder component which checks the user id logic

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@Abishek1998 

this is known behavior

check this KB

Agent Workspace: Updating UserID of the user who has 'My Lists' in Agent workspace is not able to se... 

Workaround

1st you need to identify the exact field that contains the stale value:

  1. Open the affected record in sys_ux_my_list.

  2. Use Configure > Form Layout or inspect the dictionary.

  3. Confirm whether the field is:

    • A custom/string Created by field, or

    • The system field sys_created_by.

If it is the table’s custom Created by field, update it to the user’s current complete user_name. Do not update only the display value.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi, it is system field - sys_created_by

@Abishek1998 

if OOTB field then avoid modifying it

Did you try to check some other UI builder component which checks the user id logic

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Chetna_Aggarwal
Tera Contributor

The issue is likely not with the sys_user record anymore, but with data that was already created using the old (truncated) user record or cached user reference.

What's happening

  • Originally, the Email field on sys_user had a max length of 40 characters.
  • Long email addresses were truncated.
  • You later increased the field length and corrected the users' emails/user IDs.
  • However, in HR Agent Workspace, when creating a new list, records in sys_ux_my_list are still showing the old truncated user ID in the Created by field.

Things to check

  1. Verify the actual sys_created_by value
    • Open the sys_ux_my_list record.
    • Check the sys_created_by field.
    • Remember that sys_created_by stores the user name (string), not a reference to sys_user.
    • If it contains the old truncated username, updating the sys_user record will not update existing records.
  2. Clear caches
    • Run:

       
      cache.do
       

      or

       
      cache.do?sysparm_clear=true
       
    • Also try logging out and back in.
  3. Check if the username (user_name) changed
    • If you changed the user_name after records were created, older audit/system fields will still retain the original value.
    • sys_created_by is immutable historical data.
  4. Test with a newly created user
    • Create a brand-new list.
    • Check whether the new sys_ux_my_list record uses the correct sys_created_by.
    • If new records are correct, only historical records are affected.
  5. Look for custom logic
    • Check for:
      • Business Rules on sys_ux_my_list
      • Flows
      • Script Includes
      • Workspace client scripts
    • Ensure none are populating values based on the old username.

If only old records are affected

This is expected because system fields (sys_created_by, sys_updated_by) are snapshots of the username at the time the record was created. Updating the sys_user.user_name later does not update these fields.