Notifications

168 views

Symptoms


Duplicate form or form section records after committing update set

Release


After committing an update set duplicate forms (duplicate records on sys_ui_form table) now appear.

Environment


All

Cause


Duplicate records with different sys_ids were somehow created in the sys_update_version table. When the update set executes, coalescing will pick the erroneous form to compare to on preview, since this form does not exist, we get a creation on commit of a new form instead of an update to the existing from.

Resolution


OPTION 1. Back out the update set then recommit:

  1. Back out update set if possible.
  2. Backup erroneous record on sys_update_version table via .xml export.
  3. Delete the erroneous record on the sys_update_version table using a GlideRecord script in 'Scripts - Background'
  4. Commit the update set again.

OPTION 2. Update the form by Update Set:

  1. For the source instance:
    1. export XML on sys_ui_form record for the form view
      2. export XML on sys_ui_form_section for the view
      3. Make the update set for the sys_ui_section and sys_ui_element changes for the view
  2.  On the target instance prepare for update:
    1. check the sys_ui_form sys_id is matching the source instance, if not match, export XML as backup copy
      2. check the sys_ui_form_section record: a. sys_id same as source instance, b. View the XML of the record, check the sys_ui_section id is matches the sys_ui_section position 0 record. If not match, export xml file for backup
      3. export sys_ui_section record for backup.
  3. Update steps:
    1. If the sys_ui_form sys_id on target instance is not match on source instance, import XML file for sys_ui_form record from source instance (step 1 in source instance)
    2. Delete sys_ui_section record on target instance which you need update from update Set
    3. Checking the delete record from sys_metadata_delete table (*** there is known issue when there were delete records existed on sys_metadata_delete table with the same table may cause updating incorrectly):

      ***Special note: You need to delete the related records in sys_metadata_delete table on all above delete records since the deleted record may cause the Update Set updating not correctly.

    4. Go to sys_metadata_delete.list
    5. Search display name: table name of the view, for example rm_story
    6. Search Table name: "Form Section"
    7. If the sys_ui_form_section sys_id or the section sys_id on target instance is not match source instance record, import XML file for sys_form_section from source instance (step 2 in source instance)
    8. Using update set from source instance to target instance.

 

Additional Information


Coalesce strategies for update sets can be found here.

Article Information

Last Updated:2018-11-08 14:48:50
Published:2018-11-08