Delete Cross Scope POlicy is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2020 04:08 AM
Hi All,
I have a scoped application. I have a data source in the application.I am trying to delete the attachment attached to the data source through background script . I have added delete cross scope policy from my application but still my script is not working and i am unable to delete the attachment from my datasource. Please suggest.
var attach = new GlideRecord("sys_attachment");
attach.addEncodedQuery('table_nameSTARTSWITHsys_data_source^table_sys_id=c9d2bb99db9c1810776f15ce3b9619e6');
attach.query();
if(attach.next())
{
gs.info("Test the Deleting Attachments");
attach.deleteRecord();
}
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2021 11:09 AM
Worked like a Charm. No need to provide "Can Delete" to sys_attachment.
Thanks