Deletion of bulk records for the Legacy sn_hr_core_case_relations table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:51 AM
Hi everyone,
We are not using the legacy sn_hr_core_case_relations table in our instance anymore, but we have bulk records from the legacy sn_hr_core_case_relations table in our instance which was migrated in a data migration process, any idea on how can we delete these records? Background scripts or manual deletion is not working as it's unable to find the table in the instance.
Thank you in advance. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:57 AM - edited ‎02-06-2024 05:02 AM
Dou you want to delete all records or specific records from that table?
https://www.servicenow.com/community/platform-analytics-forum/delete-multiple-records-using-backgrou... - Refer this link for solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:59 AM - edited ‎02-06-2024 04:59 AM
Specific records of that table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 05:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 05:07 AM
Hi @Simanta27
You can use script.
javascript
var gr = new GlideRecord('sn_hr_core_case_relations');
gr.addQuery('field_name', 'field_value'); // replace field_name and field_value with the actual field name and value gr.query();
while (gr.next())
{ gr.deleteRecord();
}
Kindly mark helpful/Solution.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel