- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 03:29 AM
Hello eveyone, I have an issue about deletion of catalog item variables with script. My categories, catalog items and catalog item variables have been created and automated using script. But there is a problem about deletion of catalog item variables with script. I can't delete any catalog item variables. I have specified the script section I used below.
var gr = new GlideRecord("item_option_new");
gr.addQuery('sys_scope',scope);
gr.query();
if(gr.next()){
gr.deleteRecord(true);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 05:23 AM
@Alpcan you might have to create a cross scope policy to do it via your scope
navigate to Application -cross scope access and create a new one like below
Target scope is your scope and target name is your table name and select operation as delete
and set status as allowed.
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 04:53 AM
IN the background script change the scope to global in the scope picker and try running it once again
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 05:03 AM
This time it worked. Is there any way to trigger it from the script in my own scope?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 05:23 AM
@Alpcan you might have to create a cross scope policy to do it via your scope
navigate to Application -cross scope access and create a new one like below
Target scope is your scope and target name is your table name and select operation as delete
and set status as allowed.
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 05:46 AM
When I try this it says 'Cross scope runtime access record already exists.'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 05:49 AM
@Alpcan go to cross scope table and search for an existing record where source scope can be your scope and try to change the status of it to allowed .
Note : operation should be delete