Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-05-13· OpenAIAi2 WildChat-4.8M (AI2)

In servicenow while previewing update set it shows error = could not finad a record in…

  1. User

    In servicenow while previewing update set it shows error = could not finad a record in sys_user for column owner referenced in this update.. how to fix thia

  2. Assistant

    When you encounter the error "could not find a record in sys_user for column owner referenced in this update" while previewing an update set in ServiceNow, it means that the update set is referencing a user (sys_user) that does not exist in the target instance. Here are steps to fix this issue:

    1. Identify the Missing User:

      • Check the details of the record that is causing the error to identify the sys_user reference (owner) that is missing.
    2. Manual Insert:

      • Manually create a sys_user record in the target instance matching the details of the missing user.
      • Navigate to User Administration > Users and create a new user with the same details (username, email, etc.) as the missing user from the source instance.
    3. Update the Update Set:

      • If the missing user is not critical, you can modify the update set XML to either replace or remove the missing reference.
      • Export the update set as XML, open it in a text editor, and find the entries with <sys_user> references. Remove or correct these references accordingly.
      • Import the modified XML back into the target instance and preview it again.
    4. Ensure Data Consistency:

      • Check to see if there's filtered or scoped data that might be causing the issue. Correct any scope mismatches or data segregation issues.
    5. Reapply the Update Set:

      • After addressing the missing reference, re-import and preview the update set to ensure there are no further issues.

    Here are the steps in more detail:

    Step-by-Step Guide:

    1. Identify the Missing User:

      • You will see the sys_id of the missing user in the error message.
    2. Creating the Missing sys_user Record:

      • Go to User Administration > Users.
      • Click the New button to create a new user record.
      • Fill in the user details, ensuring it matches the user in the source instance (you might need access to the source instance to get this information).
      • Alternatively, if you have a lot of such users or if the manual approach seems tedious, consider creating a data migration script.
    3. Modify the Update Set XML:

      • Navigate to the Retrieved Update Sets module.
      • Click on the update set causing the error.
      • Click on the Export to XML related link.
      • Open the XML file in a text editor.
      • Search for the record that contains the broken reference.
      • Update the owner field with a valid sys_id of a user in the target instance or remove it if it's nonessential.
    4. Re-import the Modified Update Set:

      • Go to Retrieved Update Sets again.
      • Click on Import Update Set from XML.
      • Upload the modified XML.
      • Preview the update set again to check if the issue is resolved.

    By addressing the missing user reference in one of these ways, you should be able to successfully preview and commit the update set in your target instance.