GlideArchiveRecord is not allowed in scoped applications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 06:24 AM
Hi, I have created an Archive rule for my custom table "x_....." and auto-created "ar_x_.....". I want to trigger the archive with my archive button on the record form. UI Action contains:
new GlideArchiveRecord().archive(gr);
I have received this error. How can I get archive functionality on demand in another way in my scoped app? Please advise.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 07:31 AM
@Suprun Dmytro Put the
new GlideArchiveRecord().archive(gr);
call in a script include defined in the Global Scope. Call that Global scrip include method from your scoped UI Action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 07:50 AM
Hi, @Sandeep Rajput yes, I have a script include inside my UI action as well and I am using:
new GlideArchiveRecord().archive(gr);
with the new syntax, but my script include created in my custom app, during the migration I can't include it in my application, this is the problem, can I have archive functionality from my app? Or extend any other script include from my app?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 07:59 AM
@Suprun Dmytro Since
GlideArchiveRecord
is available in the Global Scope, you will not be able to call it from a scoped application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 08:19 AM
I got it, thank you for the answer! So how can I trigger archive functionality on demand in my scope app, keeping my app consistent? Are there any other ways?