unable to capture the deleted records of sys_portal and sys_portal_preferences in update set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2024 11:56 PM
I am unable to capture the deleted records of sys_portal and sys_portal_preferences in update set.
This is needed because we have to remove these records from Production, hence trying to capture the deletion in lower instances. Merely moving the xmls will not delete the unwanted records in sys_portal and sys_portal_preferences.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Anyone knows solution for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi, you can try this code manually:
// Business Rule o Fix Script da eseguire in Production
// Inserisci i sys_id dei record da eliminare
var recordsToDelete = [
'sys_id_portal_1',
'sys_id_portal_2',
'sys_id_preference_1'
];
recordsToDelete.forEach(function(sysId) {
var gr = new GlideRecord('sys_portal');
if (gr.get(sysId)) {
gs.info('Deleting portal: ' + gr.getValue('title') + ' (' + sysId + ')');
gr.deleteRecord();
}
// Anche per sys_portal_preferences
gr = new GlideRecord('sys_portal_preferences');
if (gr.get(sysId)) {
gs.info('Deleting portal preference: ' + sysId);
gr.deleteRecord();
}
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Seems helpful
