Restoring a deleted role and related tables


Deleting an important role can have a big impact on an instance. In this case, restoring the instance from backup is not the solution. Follow the steps below to restore a deleted role and its related tables, therefore helping regain the previous order. 



Some manual fixes may be needed after restoring the deleted records but the restoration of specific tables will help get users, groups, applications, and modules working as expected again. The following steps use the itil role as an example of the deleted role.

Step 1:  Locate the deleted record and restore it.

To located and restore the deleted record:

    1. Navigate to System Definition > Deleted Records.

    1. Filter the list using Tablename | is | sys_user_role. Alternatively, add the following extension to the instance URL:  /

  1. If the record is not available to restore, you can export and import the role in XML format from another instance. For additional information, refer to Export List Data
    Note: The sys_id of the role should match with the tables that are being copied from the other instance.


Step 2:  Export related tables from a sub-production instance where the role relationships are intact.

    1. Right-click the list header and select Export > XML to pull specific lists of the records that are needed.

  1. Export the data from the most recent copy of the affected instance. The list below indicates the main tables that should be copied over, note that we are filtering the lists to only include the records that are related to the role that is being restored.

    sys_user_has role
    ( user roles table where users had the itil role )
    [ e.g.  / ]

    ( module records that had the itil role )
    [ e.g.  / ]

    ( application records that had the itil role )
    [ e.g.  /!%3Dmobile%5Eroles%3Ditil&sysparm_view= ]

    ( group roles table that had the itil role )
    [ e.g.  / ]

    ( roles that had the itil role )
    [ e.g.  / ]


Step 3:  Import related tables to the affected instance.

    1. Navigate to any list on the target instance.

  1. Right-click the column header in the list and select Import > XML.

Step 4:  Review the results and manually fix any remaining items.

Article Information

Last Updated:2019-08-02 21:35:45