If a retrieved update set contains table record payloads and the table has a self-reference column, when the retrieved update set is being previewed, the update set preview might failed with a preview error siilar to the following example that uses table sp_rectangle_menu_item:
"Could not find a record in sp_rectangle_menu_item for column sp_rectangle_menu_item referenced in this update"
Steps to Reproduce
- Create a new update set and make it current.
- Navigate to Service Portal > Service Portal Configuration > Menus
- Open one of the records.
- In the Menu Item list, click Pages.
- Change the value for the Order field and click Save. Note the Sys ID.
- Verify a record for table [sp_rectangle_menu_item] has been added to the update set.
- Set the update set to Complete and export it to XML.
- Log in to another instance.
- Access the [sp_rectangle_menu_item] table and verify that the record with the Sys ID noted at step 6 exists.
- Retrieve the update set from XML and preview it.
Make sure the update set preview error is similar to "Could not find a record in <table_name> for column <column_name> referenced in this update," where the table_name and the column_name are the same.
Navigate to System Definition > Tables, search for the table with the table name from the error message, and make sure the table contains a self-reference column.
Note – Do not proceed if steps 1 and 2 are not confirmed because the issue encountered may be not relevant and this workaround might not apply.
In the update set preview form, click the Accept remote update option to display the Commit Update Set button on the form.
To commit the update set in additional to previewing it, click the Commit Update Set button.
The commit proceed properly and the records in the retrieved update set should be loaded properly.
After committing the update set, navigate to the relevant table records that generates the preview error. Make sure the value in the self-reference column is properly set with the same value as specified in the record payload in the retrieved update set XML file.
Related Problem: PRB1238164