Unable to delete stockroom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 09:34 PM
Hi All,
I am not able to remove a stockroom that was decommissioned recently. The reason being the stockroom entry was locked due to reference made in the previous disposal orders that I had created.
Is there a way to workaround this? The disposal orders were closed and they shouldn't be locking the stockroom.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2025 09:55 PM
to remove a decommissioned stockroom referenced in closed disposal orders:
Navigate to the disposal order records and look for references to the stockroom and Manually clear the stockroom reference in related records if allowed.
If references prevent deletion, use a background script:
var stockroom = new GlideRecord('alm_stockroom');
if (stockroom.get('sys_id_of_stockroom')) {
stockroom.deleteRecord();
}
Confirm that deleting references does not violate business rules or reporting.