Deleted attachment still shows up on catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 03:48 AM - edited 10-13-2023 03:48 AM
I created a script in workflow to delete image in "Picture" field on catalog item. Script deleted the attachment .But the image still shows up on the form.
var gr2 = new GlideRecord('sys_attachment');
gr2.addEncodedQuery('table_name=ZZ_YYsc_cat_item^file_name=picture^table_sys_id='+sys); //sys = selected catlog item on form
gr2.query();
if(gr2.next()) {
gr2.deleteRecord();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 03:58 AM
Hi,
Why are you not going into the catalog item and deleting the picture form there? Why using a script to delete it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 04:03 AM
This is a part of request to make direct updates in Production.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 04:08 AM
As an admin you can do it in prod as well, if you can run the script you can remove the picture